Bug 41 : Join Tree - not fully built ... limiting query joins...
Priority 
Medium
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
0.9.6
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
25/02/2008
Updated 
25/02/2008
Type 
Bug
 
Attachments 
No attachments

The Bug is in JoinTreeFactory, it was incorrectly detecting the end of building the Join tree (which is recursive). This would stop the join tree from being "fully formed".

For example... this query might not bring back the shipping address country.

find order
join customer
join customer.shippingAddress
join customer.shippingAddress.country

... but would for billing address country.

find order
join customer
join customer.billingAddress
join customer.billingAddress.country

 
Rob 25 Feb 21:00
The reason...

The reason for the bug in this case is that would stop the building at shippingAddress country because it had already come across the country type before (in billingAddress country).

The fix: Remove the previous test and replace it with the more specific test to detect master/detail relationships and stop at that point. This is that the type and the grandparent type are the same.

Fixed in 0.9.5b.

woResponse

Upload a file