[hibernate-commits] Hibernate SVN: r10247 - branches/Branch_3_2/Hibernate3/src/org/hibernate/mapping
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Fri Aug 11 14:49:49 EDT 2006
Author: steve.ebersole at jboss.com
Date: 2006-08-11 14:49:33 -0400 (Fri, 11 Aug 2006)
New Revision: 10247
Modified:
branches/Branch_3_2/Hibernate3/src/org/hibernate/mapping/Property.java
Log:
ported fix for HHH-1740 to 3.2 branch
Modified: branches/Branch_3_2/Hibernate3/src/org/hibernate/mapping/Property.java
===================================================================
--- branches/Branch_3_2/Hibernate3/src/org/hibernate/mapping/Property.java 2006-08-11 18:39:47 UTC (rev 10246)
+++ branches/Branch_3_2/Hibernate3/src/org/hibernate/mapping/Property.java 2006-08-11 18:49:33 UTC (rev 10247)
@@ -201,7 +201,19 @@
// interception. So we need to make sure that we return
// true here for the case of many-to-one and one-to-one
// with lazy="no-proxy"
- return ( ( ToOne ) value ).isLazy();
+ //
+ // * impl note - lazy="no-proxy" currently forces both
+ // lazy and unwrap to be set to true. The other case we
+ // are extremely interested in here is that of lazy="proxy"
+ // where lazy is set to true, but unwrap is set to false.
+ // thus we use both here under the assumption that this
+ // return is really only ever used during persister
+ // construction to determine the lazy property/field fetch
+ // groupings. If that assertion changes then this check
+ // needs to change as well. Partially, this is an issue with
+ // the overloading of the term "lazy" here...
+ ToOne toOneValue = ( ToOne ) value;
+ return toOneValue.isLazy() && toOneValue.isUnwrapProxy();
}
return lazy;
}
More information about the hibernate-commits
mailing list