From: Max R. A. <max...@jb...> - 2006-08-24 05:48:28
|
that move just broke *all* of the code generation :( /max ------- Forwarded message ------- From: hib...@li... To: hib...@li... Cc: Subject: [hibernate-commits] Hibernate SVN: r10319 - = branches/Branch_3_2/Hibernate3/src/org/hibernate/mapping Date: Wed, 23 Aug 2006 23:57:11 +0200 Author: epbernard Date: 2006-08-23 17:57:10 -0400 (Wed, 23 Aug 2006) New Revision: 10319 Modified: branches/Branch_3_2/Hibernate3/src/org/hibernate/mapping/PersistentC= lass.java Log: ANN-381 add identifierProperty to getProperty and getRecursiveProperty Modified: = branches/Branch_3_2/Hibernate3/src/org/hibernate/mapping/PersistentClass= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- = branches/Branch_3_2/Hibernate3/src/org/hibernate/mapping/PersistentClass= .java 2006-08-23 = 13:36:35 UTC (rev 10318) +++ branches/Branch_3_2/Hibernate3/src/org/hibernate/mapping/PersistentC= lass.java 2006-08-23 = 21:57:10 UTC (rev 10319) @@ -349,7 +349,14 @@ while ( st.hasMoreElements() ) { String element =3D (String) st.nextElement(); if (property =3D=3D null) { - property =3D getProperty( element, iter ); + Property identifierProperty =3D getIdentifierProperty(); + if ( identifierProperty !=3D null + && identifierProperty.getName().equals( StringHelper.root(elemen= t) = ) ) { + property =3D identifierProperty; + } + else { + property =3D getProperty( element, iter ); + } } else { //flat recursive algorithm @@ -379,7 +386,15 @@ public Property getProperty(String propertyName) throws MappingExcept= ion = { Iterator iter =3D getPropertyClosureIterator(); - return getProperty( propertyName, iter ); + Property identifierProperty =3D getIdentifierProperty(); + if ( identifierProperty !=3D null + && = identifierProperty.getName().equals( StringHelper.root(propertyName) ) + ) { + return identifierProperty; + } + else { + return getProperty( propertyName, iter ); + } } abstract public int getOptimisticLockMode(); _______________________________________________ hibernate-commits mailing list hib...@li... https://lists.jboss.org/mailman/listinfo/hibernate-commits -- = -- Max Rydahl Andersen callto://max.rydahl.andersen Hibernate ma...@hi... http://hibernate.org JBoss a division of Red Hat max...@jb... |