From: NHibernate J. <nh...@gm...> - 2009-01-13 14:21:31
|
[ http://jira.nhibernate.org/browse/NH-1452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17467#action_17467 ] Jozef Sevcik commented on NH-1452: ---------------------------------- Patch I attached will not work for persistence/HQL. It can fix loading entities that uses <join> with <property-ref> but when saving, primary key of parent is still used. Haven't tested HQL, but I assume it will not work properly. There are two options: 1. Add support for persistence/HQL/StatelessSession also (http://opensource.atlassian.com/projects/hibernate/browse/HHH-1829?focusedCommentId=26029#action_26029 may be helpful, but it's not trivial IMHO) 2. Completely revert this feature (which has never been supported by Hibernate, e.g. <join> with <property-ref> has never been implemented in Hibernate, see Gavin response here: http://forum.hibernate.org/viewtopic.php?t=937111) Problem is that 'property-ref' remains in XSD schema for <join><key>, that's why people tend to think this should work and it's bug if it does not work. > Join element doesn't support keys with property-refs > ---------------------------------------------------- > > Key: NH-1452 > URL: http://jira.nhibernate.org/browse/NH-1452 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 2.0.0.CR2 > Reporter: Brian Rumschlag > Priority: Major > Attachments: 1452.patch, NH1452.patch > > > The <join> element does not use the property-ref attribute on it's <key>. > It will always join to the child table by the primary key. > Attached is the failing test case. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |