access to Peer.getOMClass for new objects?

2009-02-19 Thread Brendan Miller
I have a table in my schema that uses an inheritance map for one of the columns: column name=SERVICE_TYPE javaName=ServiceType size=50 type=VARCHAR inheritance=single inheritance key=CUSTOM class=CustomService extends=foo.service.Service/ inheritance key=SPECIAL

Re: access to Peer.getOMClass for new objects?

2009-02-19 Thread Brendan Miller
()) .newInstance(); Brendan On Thu, Feb 19, 2009 at 10:38:33AM -0800, Brendan Miller wrote: I have a table in my schema that uses an inheritance map for one of the columns: column name=SERVICE_TYPE javaName=ServiceType size=50 type=VARCHAR inheritance=single inheritance key=CUSTOM

Re: Correct way to getRelatedObjects with each relatedObject reference to this object?

2009-02-13 Thread Brendan Miller
Thanks for the comments/interest. In the interim, I'm tempted to add public List#if($enableJava5Features)$className#end get${relCol}JoinThis() to Object.vm... Brendan I'm tempted On Fri, Feb 13, 2009 at 05:55:19PM +0100, Thomas Vandahl wrote: Brendan Miller wrote: Is there a way I can

Correct way to getRelatedObjects with each relatedObject reference to this object?

2009-02-11 Thread Brendan Miller
Maybe the subject makes sense. Let me explain. I have two tables, PURCHASE_ORDER and ITEM. ITEM has a foreign key to PRUCHASE_ORDER. Thus, the generated BasePurchaseOrder class has a getItems() method that returns all the items associated with a PurchaseOrder. I find myself with code in the

ORA-01461 on update to VARCHAR2(3000)

2008-10-08 Thread Brendan Miller
We have an existing table we have newly wrapped with a Torque object model by adding it to our schema. It has three VARCHAR2(3000) fields which we have modeled as column name=CERT_STRING size=3000 type=VARCHAR/ When performing an update to an object fetched from this table, we receive:

Re: ORA-01461 on update to VARCHAR2(3000)

2008-10-08 Thread Brendan Miller
-long-value-only-for.html but I _have_ seen trouble w/Oracle. --- On Wed, 10/8/08, Brendan Miller [EMAIL PROTECTED] wrote: From: Brendan Miller [EMAIL PROTECTED] Subject: ORA-01461 on update to VARCHAR2(3000) To: torque-user@db.apache.org Date: Wednesday, October 8, 2008, 1:13 PM We have

Re: Criteria.addIn on List or Object[] doesn't generate quoted strings?

2008-03-06 Thread Brendan Miller
: Brendan Miller [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 6:54 PM To: torque-user@db.apache.org Subject: Criteria.addIn on List or Object[] doesn't generate quoted strings? I am trying to use the addIn() method of the Criteria class. I have a table with various states

Re: Configuring torque to restrict it to a specifc table list in an existing schema

2008-01-15 Thread Brendan Miller
That approach is certainly feasible. But i was looking for something on the lines of providing the table list as an input to the jdbc task, but it seems that currently there is no way of doing that. The current jdbc task does not allow that. It could be written in, I suppose, but in

Oracle Date Village Patch

2007-11-21 Thread Brendan Miller
It seems I have a knack for running into problems that were discussed at length and (partially?) solved ages ago. That said, I have a table in Oracle with a column of type DATE. It doesn't matter whether I tell Torque this is a DATE or TIMESTAMP column in the schema.xml, because as we all know,

Re: Wrong SQL generation from Criteria

2007-10-25 Thread Brendan Miller
Sorry to repost, but any thoughts on this? I'm getting this again (wrote some more code like the above), this time without any addAscending...: Criteria crit = new Criteria(); crit.addJoin(TransactionPeer.ORDER_ID, OrderPeer.ID); crit.add(TransactionPeer.ACCT_ID, account.getID());

Re: Wrong SQL generation from Criteria

2007-10-20 Thread Brendan Miller
On Fri, Oct 19, 2007 at 03:14:02PM -0700, Brendan Miller wrote: But this still leaves me a column ambiguously defined error when using addJoin(): crit.addJoin(TableAPeer.ColumnX, TableBPeer.ColumnG); crit.addAscendingOrderByColumn(TableBPeer.ColumnQ

Re: Wrong SQL generation from Criteria

2007-10-19 Thread Brendan Miller
But this still leaves me a column ambiguously defined error when using addJoin(): crit.addJoin(TableAPeer.ColumnX, TableBPeer.ColumnG); crit.addAscendingOrderByColumn(TableBPeer.ColumnQ); crit.addAscendingOrderByColumn(TableBPeer.ColumnR); ListTableB

ISNULL with Criterion?

2007-10-09 Thread Brendan Miller
There doesn't seem to be a getNewCriterion(String column, SqlEnum comparison) What do I do if I need something like select ... where a 1 and a 0 and (b is null or (b not like 'abc%' and b not like 'xyz%') ? I was planning on Criteria crit = new Criteria(); crit.add(a, 1,

Re: Torque/Village issues selects without bind variables on MyPeer.doDelete(criteria)?

2007-09-25 Thread Brendan Miller
Thomas Fischer wrote: Anyone have any ideas on how to delete the row/object without incurring this SELECT without bind variables query? Knowing this is the worst statement for a OR layer: If it is just this single table, I'd recommend using pure jdbc for creating a prepared statement

Wrong SQL generation from Criteria

2007-04-18 Thread Brendan Miller
Maybe I'm doing something very poor, but I thought I had used these constructs successfully before. (This is Oracle, BTW.) My RESOURCE_LOCK table schema: table name=RESOURCE_LOCK column name=ITEM_ID size=27 type=DECIMAL javaName=ItemID/ column name=RESOURCE_DESCRIPTOR

Re: Wrong SQL generation from Criteria

2007-04-18 Thread Brendan Miller
Thanks for the thorough explanation--this would make a great addition to the documentation if there was an How things work section. I see now why Torque is doing what it is doing. What I was hoping to achieve was a list of records grouped by one or more of the fields. That way I could let the

Re: Wrong SQL generation from Criteria

2007-04-18 Thread Brendan Miller
On Wed, Apr 18, 2007 at 02:23:12PM -0400, Greg Monroe wrote: Sounds like you want to use the: Criteria.addAscendingOrderBy(Column) Criteria.addDecendingOrderBy(Column) Right you are. I guess I got the group by mentality because I don't really care what order they're in--just so long as

Criteria to insert into from select?

2007-04-18 Thread Brendan Miller
Here's another Criteria question. Is it possible to express INSERT INTO table (...) SELECT ... FROM anotherTable WHERE... using Criteria and doInsert()? (I don't think so--I fully expect a Torque is an OM mapper, and you're not doing any mapping there response.) Brendan

Re: Wrong SQL generation from Criteria

2007-04-18 Thread Brendan Miller
Right you are. I guess I got the group by mentality because I don't really care what order they're in--just so long as records with the same values for certain columns are together. But this still leaves me a column ambiguously defined error when using addJoin():

Re: Wrong SQL generation from Criteria

2007-04-18 Thread Brendan Miller
On Wed, Apr 18, 2007 at 03:55:33PM -0700, Brendan Miller wrote: Right you are. I guess I got the group by mentality because I don't really care what order they're in--just so long as records with the same values for certain columns are together. But this still leaves me a column

Re: Insert using ORACLE systimestamp

2007-02-26 Thread Brendan Miller
On Sat, Feb 24, 2007 at 07:37:47PM +0100, Thomas Vandahl wrote: Brendan Miller wrote: Is there a way for an object's .save() method to insert using Oracle's SYSTIMESTAMP built-in for tables that have a timestamp field? I'd suggest to think about this again. In an application

Insert using ORACLE systimestamp

2007-02-20 Thread Brendan Miller
Is there a way for an object's .save() method to insert using Oracle's SYSTIMESTAMP built-in for tables that have a timestamp field? Thanks, Brendan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

RE: Namespace (packageName) by table within schema?

2007-02-06 Thread Brendan Miller
it. Thomas Brendan Miller [EMAIL PROTECTED] schrieb am 01.02.2007 17:22:51: We would like to create a schema with the Torque classes generated in different namespaces for particular tables. Some tables would be in the same namespace, but some would be different. And sometimes

Namespace (packageName) by table within schema?

2007-02-01 Thread Brendan Miller
We would like to create a schema with the Torque classes generated in different namespaces for particular tables. Some tables would be in the same namespace, but some would be different. And sometimes there will be foreign keys from one table to another table that is in a different package.