From: Maarten W. (JIRA) <no...@at...> - 2006-05-01 13:26:25
|
Allow set (or any collection) property-ref to property on joined-table to be join-fetched with HQL. --------------------------------------------------------------------------------------------------- Key: HHH-1710 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1710 Project: Hibernate3 Type: Improvement Components: core Versions: 3.2.0 cr1 Reporter: Maarten Winkels Attachments: joinsetpropertyref.zip I have an entity that is split over two tables, with a <join ... /> in the mapping. This entity has a <set .../> which has a <key ... property-ref="aProperty"/>. The "aProperty" is mapped to the joined table. When querying using HQL and join fetching the collection, Hibernate generates a faulty join statement. It atempts to join on the correct column (the one indicated in the property-ref) but on the wrong table (the primary table in stead of the joined table). The attached testcase shows the situation. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Maarten W. (JIRA) <no...@at...> - 2006-05-01 20:09:24
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1710?page=all ] Maarten Winkels updated HHH-1710: --------------------------------- Attachment: joinsetpropertyref.patch This patch seems to work fine for my test AND all other tests seem to run fine as well. I've commented out an extra restriction, of which I don't know wether it makes sense. Please look into the patch and feel free to adapt/use it. > Allow set (or any collection) property-ref to property on joined-table to be join-fetched with HQL. > --------------------------------------------------------------------------------------------------- > > Key: HHH-1710 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1710 > Project: Hibernate3 > Type: Improvement > Components: core > Versions: 3.2.0 cr1 > Reporter: Maarten Winkels > Attachments: joinsetpropertyref.patch, joinsetpropertyref.zip > > > I have an entity that is split over two tables, with a <join ... /> in the mapping. This entity has a <set .../> which has a <key ... property-ref="aProperty"/>. The "aProperty" is mapped to the joined table. > When querying using HQL and join fetching the collection, Hibernate generates a faulty join statement. It atempts to join on the correct column (the one indicated in the property-ref) but on the wrong table (the primary table in stead of the joined table). > The attached testcase shows the situation. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-07-10 15:06:03
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1710?page=all ] Steve Ebersole reassigned HHH-1710: ----------------------------------- Assign To: Steve Ebersole > Allow set (or any collection) property-ref to property on joined-table to be join-fetched with HQL. > --------------------------------------------------------------------------------------------------- > > Key: HHH-1710 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1710 > Project: Hibernate3 > Type: Improvement > Components: core > Versions: 3.2.0 cr1 > Reporter: Maarten Winkels > Assignee: Steve Ebersole > Attachments: joinsetpropertyref.patch, joinsetpropertyref.zip > > > I have an entity that is split over two tables, with a <join ... /> in the mapping. This entity has a <set .../> which has a <key ... property-ref="aProperty"/>. The "aProperty" is mapped to the joined table. > When querying using HQL and join fetching the collection, Hibernate generates a faulty join statement. It atempts to join on the correct column (the one indicated in the property-ref) but on the wrong table (the primary table in stead of the joined table). > The attached testcase shows the situation. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-07-10 16:48:57
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1710?page=all ] Steve Ebersole updated HHH-1710: -------------------------------- Summary: persistent collections with property-ref to secondary tables cannot be joined in HQL (was: Allow set (or any collection) property-ref to property on joined-table to be join-fetched with HQL.) type: Bug (was: Improvement) Fix Version: 3.2.0.ga > persistent collections with property-ref to secondary tables cannot be joined in HQL > ------------------------------------------------------------------------------------ > > Key: HHH-1710 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1710 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.2.0 cr1 > Reporter: Maarten Winkels > Assignee: Steve Ebersole > Fix For: 3.2.0.ga > Attachments: joinsetpropertyref.patch, joinsetpropertyref.zip > > > I have an entity that is split over two tables, with a <join ... /> in the mapping. This entity has a <set .../> which has a <key ... property-ref="aProperty"/>. The "aProperty" is mapped to the joined table. > When querying using HQL and join fetching the collection, Hibernate generates a faulty join statement. It atempts to join on the correct column (the one indicated in the property-ref) but on the wrong table (the primary table in stead of the joined table). > The attached testcase shows the situation. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-07-10 17:13:58
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1710?page=all ] Steve Ebersole resolved HHH-1710: --------------------------------- Resolution: Fixed > persistent collections with property-ref to secondary tables cannot be joined in HQL > ------------------------------------------------------------------------------------ > > Key: HHH-1710 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1710 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.2.0 cr1 > Reporter: Maarten Winkels > Assignee: Steve Ebersole > Fix For: 3.2.0.ga > Attachments: joinsetpropertyref.patch, joinsetpropertyref.zip > > > I have an entity that is split over two tables, with a <join ... /> in the mapping. This entity has a <set .../> which has a <key ... property-ref="aProperty"/>. The "aProperty" is mapped to the joined table. > When querying using HQL and join fetching the collection, Hibernate generates a faulty join statement. It atempts to join on the correct column (the one indicated in the property-ref) but on the wrong table (the primary table in stead of the joined table). > The attached testcase shows the situation. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |