[hibernate-dev] Fwd: [hibernate-commits] Hibernate SVN: r10319 - branches/Branch_3_2/Hibernate3/src/org/hibernate/mapping

Max Rydahl Andersen max.andersen at jboss.com
Thu Aug 24 01:51:15 EDT 2006


right list...

well, maybe not all code generation, but it surely seem to mess it up  
pretty good ;(

/max

------- Forwarded message -------
From: "Max Rydahl Andersen" <max.andersen at jboss.com>
To: "Hibernate development" <hibernate-devel at lists.sourceforge.net>
Cc:
Subject: Fwd: [hibernate-commits] Hibernate SVN: r10319 -  
branches/Branch_3_2/Hibernate3/src/org/hibernate/mapping
Date: Thu, 24 Aug 2006 07:48:00 +0200


that move just broke *all* of the code generation :(

/max

------- Forwarded message -------
From: hibernate-commits at lists.jboss.org
To: hibernate-commits at lists.jboss.org
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/PersistentClass.java
Log:
ANN-381 add identifierProperty to getProperty and getRecursiveProperty

Modified:
branches/Branch_3_2/Hibernate3/src/org/hibernate/mapping/PersistentClass.java
===================================================================
---
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/PersistentClass.java	2006-08-23
21:57:10 UTC (rev 10319)
@@ -349,7 +349,14 @@
   			while ( st.hasMoreElements() ) {
   				String element = (String) st.nextElement();
   				if (property == null) {
-					property = getProperty( element, iter );
+					Property identifierProperty = getIdentifierProperty();
+					if ( identifierProperty != null
+							&& identifierProperty.getName().equals( StringHelper.root(element)
) ) {
+						property = identifierProperty;
+					}
+					else {
+						property = getProperty( element, iter );
+					}
   				}
   				else {
   					//flat recursive algorithm
@@ -379,7 +386,15 @@

   	public Property getProperty(String propertyName) throws MappingException
{
   		Iterator iter = getPropertyClosureIterator();
-		return getProperty( propertyName, iter );
+		Property identifierProperty = getIdentifierProperty();
+		if ( identifierProperty != null
+				&&
identifierProperty.getName().equals( StringHelper.root(propertyName) )
+				) {
+			return identifierProperty;
+		}
+		else {
+			return getProperty( propertyName, iter );
+		}
   	}

   	abstract public int getOptimisticLockMode();

_______________________________________________
hibernate-commits mailing list
hibernate-commits at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-commits



-- 
--
Max Rydahl Andersen
callto://max.rydahl.andersen

Hibernate
max at hibernate.org
http://hibernate.org

JBoss a division of Red Hat
max.andersen at jboss.com




More information about the hibernate-dev mailing list