From: <hib...@li...> - 2006-03-04 00:21:52
|
Author: ste...@jb... Date: 2006-03-03 19:21:50 -0500 (Fri, 03 Mar 2006) New Revision: 9542 Modified: trunk/Hibernate3/src/org/hibernate/mapping/Property.java Log: HHH-1435 : lazy="no-proxy" on many/one-to-one associations; use of ~transforming class loaders~ for runtime instrumentation of domain objects for testing purposes Modified: trunk/Hibernate3/src/org/hibernate/mapping/Property.java =================================================================== --- trunk/Hibernate3/src/org/hibernate/mapping/Property.java 2006-03-04 00:20:44 UTC (rev 9541) +++ trunk/Hibernate3/src/org/hibernate/mapping/Property.java 2006-03-04 00:21:50 UTC (rev 9542) @@ -194,6 +194,15 @@ } public boolean isLazy() { + if ( value instanceof ToOne ) { + // both many-to-one and one-to-one are represented as a + // Property. EntityPersister is relying on this value to + // determine "lazy fetch groups" in terms of field-level + // 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(); + } return lazy; } |