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" <[EMAIL PROTECTED]>
To: "Hibernate development" <hibernate-devel@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: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
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
[EMAIL PROTECTED]
https://lists.jboss.org/mailman/listinfo/hibernate-commits
--
--
Max Rydahl Andersen
callto://max.rydahl.andersen
Hibernate
[EMAIL PROTECTED]
http://hibernate.org
JBoss a division of Red Hat
[EMAIL PROTECTED]
_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev