Re: Antwort: Correct way to getRelatedObjects with each relatedObject reference to this object?
Thomas Vandahl <[email protected]> Fri, 13 Feb 2009 18:01:40 +0100
| Newsgroups | gmane.comp.jakarta.turbine.torque.user |
|---|---|
| Message-ID | <[email protected]> |
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 increase coupling between objects.
>
The method add${relCol} already does this. So there will be no more
coupling than before. I agree that all these items should have a
reference to the same purchase order instance. The fix would require
another loop, however, which slows down these methods considerably.
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.
Bye, Thomas.