ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Maves" <nathan.ma...@gmail.com>
Subject Re: how to deal with one-to-many relationship?
Date Fri, 27 Oct 2006 21:28:59 GMT
You are correct. You can not achieve this though the xml configuration.

On 10/27/06, Koka Kiknadze <226057@gmail.com> wrote:
> Nathan,
> I think the problem here is not the N+1 one. The Order object has a list
> of OrderLineItem objects. But one may want each instance of OrderLineItem
> to hold reference to the parent Order object...
> IMHO there's no way to achieve it using only XML file. I recall I've used
> workaround like this:
> immediatly after calling get findOrderById(String oredrID) i
> programmatically looped through resultOrder.getOrderLineItems() and set
> order to resultOrder.
> Although usually I do not need the child list objects to hold reference to
> the parent object, I believe it will be handy feature to make it possible
> without such extra loops (or custom rowhandlers...)
> Koka

View raw message