[hibernate-commits] Hibernate SVN: r10245 - trunk/Hibernate3/src/org/hibernate/mapping

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Fri Aug 11 14:38:55 EDT 2006


Author: steve.ebersole at jboss.com
Date: 2006-08-11 14:38:39 -0400 (Fri, 11 Aug 2006)
New Revision: 10245

Modified:
   trunk/Hibernate3/src/org/hibernate/mapping/Property.java
Log:
HHH-1740 : many-to-one (and one-to-one) with lazy="proxy" and bytecode instrumentation

Modified: trunk/Hibernate3/src/org/hibernate/mapping/Property.java
===================================================================
--- trunk/Hibernate3/src/org/hibernate/mapping/Property.java	2006-08-11 18:33:27 UTC (rev 10244)
+++ trunk/Hibernate3/src/org/hibernate/mapping/Property.java	2006-08-11 18:38:39 UTC (rev 10245)
@@ -201,6 +201,17 @@
 			// 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"
+			//
+			// * 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();
 		}




More information about the hibernate-commits mailing list