Author: epbernard
Date: 2010-10-04 05:45:41 -0400 (Mon, 04 Oct 2010)
New Revision: 20768
Modified:
core/trunk/core/src/main/java/org/hibernate/cfg/BinderHelper.java
Log:
HHH-5578 implement a cleaner version of getPropertyOverriddenByMapperOrMapsId in the SpecJ
case
Modified: core/trunk/core/src/main/java/org/hibernate/cfg/BinderHelper.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cfg/BinderHelper.java 2010-10-04 09:45:09
UTC (rev 20767)
+++ core/trunk/core/src/main/java/org/hibernate/cfg/BinderHelper.java 2010-10-04 09:45:41
UTC (rev 20768)
@@ -682,13 +682,10 @@
}
if ( propertyHolder.isInIdClass() ) {
PropertyData pd = mappings.getPropertyAnnotatedWithIdAndToOne( persistentXClass,
propertyName );
- if ( pd == null ) {
- String propertyPath = isId ? "" : propertyName;
- return mappings.getPropertyAnnotatedWithMapsId( persistentXClass, propertyPath );
+ if ( pd == null && System.getProperty(
"hibernate.enable_specj_proprietary_syntax" ) != null ) {
+ pd = mappings.getPropertyAnnotatedWithMapsId( persistentXClass, propertyName );
}
- else {
- return pd;
- }
+ return pd;
}
else {
String propertyPath = isId ? "" : propertyName;
Show replies by date