This content has been marked as final.
Show 4 replies
-
1. Re: 2 FETCH Joins in 1 query
maxandersen Nov 17, 2006 10:02 AM (in response to juergen.zimmermann)the stack trace says it all....
there is no way for hibernate to figure out the unique rows from a joined resultset with multiple bags.
Thus instead of creating duplicate entries in your llist we fail with the stacktrace.
In the future we plan to provide a fallback for this scenario where a second (sub)select will be done to load the other bags. -
2. Re: 2 FETCH Joins in 1 query
juergen.zimmermann Nov 17, 2006 10:10 AM (in response to juergen.zimmermann)Hmm, the attributes Customer.orders and Order.shipments are annotated with
@OneToMany(...) @OrderBy(...)
I thought that bags can be avoided this way. -
3. Re: 2 FETCH Joins in 1 query
maxandersen Nov 17, 2006 10:25 AM (in response to juergen.zimmermann)but your Orders is a List, right ?
-
4. Re: 2 FETCH Joins in 1 query
juergen.zimmermann Nov 17, 2006 1:29 PM (in response to juergen.zimmermann)Yes, both "orders" and "shipments" are of type List<>.
Will adding @IndexColumn solve the problem?