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

2009-02-15 Thread Thomas Vandahl
Brendan Miller wrote: I'm tempted Feel free. Bye, Thomas. - To unsubscribe, e-mail: torque-user-unsubscr...@db.apache.org For additional commands, e-mail: torque-user-h...@db.apache.org

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

2009-02-15 Thread Thomas Vandahl
Thomas Vandahl wrote: The getItemsJoinPurchaseOrder()-method also creates a new copy of PurchaseOrder for every line of Item. This is something I wanted to address in 4.0 anyway. Just one additional comment: Torque doesn't care much how many object copies of the same database record exist in

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

2009-02-14 Thread Alvaro Coronel
One way of getting rid of temptations is yielding. Afterwards you just run the unit tests and tell us how they turned out :) Best regards, Álvaro. From: Brendan Miller bmil...@dotster.com To: Apache Torque Users List torque-user@db.apache.org Sent: Friday,

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

2009-02-14 Thread Alvaro Coronel
Actually, I must credit Oscar Wilde for the first sentence. From: Alvaro Coronel alvarocorone...@yahoo.com To: Apache Torque Users List torque-user@db.apache.org Sent: Saturday, February 14, 2009 9:37:13 PM Subject: Re: Correct way to getRelatedObjects with

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

2009-02-13 Thread Thomas Vandahl
Brendan Miller wrote: Is there a way I can pre-populate the Items' aPurchaseOrder to the object I start with (po)? This will not provide you with the same instance, but your PurchaseOrder should have a method called getItemsJoinPurchaseOrder() (or similar) which will populate your items with

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

2009-02-13 Thread Thomas Vandahl
Thomas Fischer wrote: The only way to achieve this in general would be modifying the object.vm template which generatates the get${relCol} method. I would believe that the behaviour you describe would make sense generally. Any opinions on that from other people ? By doing this one would

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

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

2009-02-12 Thread Thomas Fischer
The only way to achieve this in general would be modifying the object.vm template which generatates the get${relCol} method. I would believe that the behaviour you describe would make sense generally. Any opinions on that from other people ? By doing this one would increase coupling between

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

2009-02-12 Thread Hidde Boonstra [Us Media]
Hi Thomas, as an user / programmer I would expect parent.getChildren().getParent() to return the original parent object. Thus I would agree that it feels natural to set the parent of the children upon retrieval of those children. Regards, Hidde. - Thomas Fischer fisc...@seitenbau.net

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