openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fayw...@apache.org
Subject svn commit: r814037 - in /openjpa/trunk: openjpa-kernel/src/main/java/org/apache/openjpa/conf/Compatibility.java openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
Date Fri, 11 Sep 2009 21:24:21 GMT
Author: faywang
Date: Fri Sep 11 21:24:12 2009
New Revision: 814037

URL: http://svn.apache.org/viewvc?rev=814037&view=rev
Log:
OPENJPA-1286: default isAbstractMappingUniDirectional to false

Modified:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/Compatibility.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/Compatibility.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/Compatibility.java?rev=814037&r1=814036&r2=814037&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/Compatibility.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/Compatibility.java
Fri Sep 11 21:24:12 2009
@@ -62,7 +62,7 @@
     private boolean _privatePersistentProperties = false;
     private boolean _autoOff = true;
     private boolean _superclassDiscriminatorStrategyByDefault = true;
-    private boolean _isAbstractMappingUniDirectional = true;
+    private boolean _isAbstractMappingUniDirectional = false;
     
     /**
      * Whether to require exact identity value types when creating object

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java?rev=814037&r1=814036&r2=814037&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
Fri Sep 11 21:24:12 2009
@@ -177,15 +177,16 @@
         conf.nontransactionalWrite.setDefault("true");
         conf.nontransactionalWrite.set(true);
         int specVersion = ((OpenJPAConfiguration) c).getSpecificationInstance().getVersion();
+        Compatibility compatibility = conf.getCompatibilityInstance();
         if (specVersion < 2) {
-            Compatibility compatibility = conf.getCompatibilityInstance();
-            compatibility.setFlushBeforeDetach(true);
+             compatibility.setFlushBeforeDetach(true);
             compatibility.setCopyOnDetach(true);
             compatibility.setPrivatePersistentProperties(true);
-            compatibility.setAbstractMappingUniDirectional(false);
             // Disable bean validation for spec level < 2 configurations
             conf.validationMode.set(String.valueOf(ValidationMode.NONE));
-        } 
+        } else {
+            compatibility.setAbstractMappingUniDirectional(true);
+        }
         return true;
     }
 



Mime
View raw message