openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curti...@apache.org
Subject svn commit: r1097520 - in /openjpa/sandboxes/perf-2.1.x: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xml/ openjpa-persistence-jdbc/src/test/resources/META-INF/ openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/per...
Date Thu, 28 Apr 2011 16:02:35 GMT
Author: curtisr7
Date: Thu Apr 28 16:02:34 2011
New Revision: 1097520

URL: http://svn.apache.org/viewvc?rev=1097520&view=rev
Log:
OPENJPA-1989: porting to sandbox.

Added:
    openjpa/sandboxes/perf-2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xml/TestToOneLazyXmlOverride.java
      - copied unchanged from r1097517, openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xml/TestToOneLazyXmlOverride.java
    openjpa/sandboxes/perf-2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xml/XmlOverrideToOneEntity.java
      - copied unchanged from r1097517, openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xml/XmlOverrideToOneEntity.java
    openjpa/sandboxes/perf-2.1.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xml/toone-orm.xml
      - copied unchanged from r1097517, openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xml/toone-orm.xml
Modified:
    openjpa/sandboxes/perf-2.1.x/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml
    openjpa/sandboxes/perf-2.1.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java

Modified: openjpa/sandboxes/perf-2.1.x/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/openjpa/sandboxes/perf-2.1.x/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml?rev=1097520&r1=1097519&r2=1097520&view=diff
==============================================================================
--- openjpa/sandboxes/perf-2.1.x/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml
(original)
+++ openjpa/sandboxes/perf-2.1.x/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml
Thu Apr 28 16:02:34 2011
@@ -385,4 +385,11 @@
             <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema"/>
         </properties>
     </persistence-unit>
+	<persistence-unit name="to-one-xml-override">
+		<mapping-file>org/apache/openjpa/persistence/xml/toone-orm.xml
+		</mapping-file>
+		<properties>
+			<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"
/>
+		</properties>
+	</persistence-unit>
 </persistence>

Modified: openjpa/sandboxes/perf-2.1.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
URL: http://svn.apache.org/viewvc/openjpa/sandboxes/perf-2.1.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java?rev=1097520&r1=1097519&r2=1097520&view=diff
==============================================================================
--- openjpa/sandboxes/perf-2.1.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
(original)
+++ openjpa/sandboxes/perf-2.1.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
Thu Apr 28 16:02:34 2011
@@ -1463,8 +1463,10 @@ public class XMLPersistenceMetaDataParse
     protected void parseOneToOne(FieldMetaData fmd, Attributes attrs)
         throws SAXException {
         String val = attrs.getValue("fetch");
-        if (val == null || "EAGER".equals(val)) {
+        if (val == null) {
             fmd.setInDefaultFetchGroup(true);
+        } else {
+            fmd.setInDefaultFetchGroup("EAGER".equals(val));
         }
         val = attrs.getValue("target-entity");
         if (val != null)
@@ -1485,8 +1487,10 @@ public class XMLPersistenceMetaDataParse
     protected void parseManyToOne(FieldMetaData fmd, Attributes attrs)
         throws SAXException {
         String val = attrs.getValue("fetch");
-        if (val == null || "EAGER".equals(val)) {
+        if (val == null) {
             fmd.setInDefaultFetchGroup(true);
+        } else {
+            fmd.setInDefaultFetchGroup("EAGER".equals(val));
         }
         val = attrs.getValue("target-entity");
         if (val != null)



Mime
View raw message