rmannibucau commented on a change in pull request #89:
URL: https://github.com/apache/openjpa/pull/89#discussion_r754844352



##########
File path: 
openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
##########
@@ -575,17 +577,25 @@ protected Object getSchemaSource() {
         boolean useExtendedSchema = true;
         // if the version and/or schema location is for 1.0, use the 1.0
         // schema
-        if (_ormVersion != null &&
-            _ormVersion.equals(XMLVersionParser.VERSION_1_0) ||
-            (_schemaLocation != null &&
-            _schemaLocation.indexOf(ORM_XSD_1_0) != -1)) {
+        if (XMLVersionParser.VERSION_1_0.equals(_ormVersion)
+                || (_schemaLocation != null && 
_schemaLocation.indexOf(ORM_XSD_1_0) > -1)) {
             ormxsd = "orm-xsd.rsrc";
             useExtendedSchema = false;
+        } else if (XMLVersionParser.VERSION_2_0.equals(_ormVersion)
+                || (_schemaLocation != null && 
_schemaLocation.indexOf(ORM_XSD_2_0) > -1)) {
+            ormxsd = "orm_2_0-xsd.rsrc";
+        } else if (XMLVersionParser.VERSION_2_1.equals(_ormVersion)
+                || (_schemaLocation != null && 
_schemaLocation.indexOf(ORM_XSD_2_1) > -1)) {
+            ormxsd = "orm_2_1.xsd.rsrc";
+            useExtendedSchema = false;

Review comment:
       I'd put it true to be able to use openjpa namespace, any reason to not 
do?
   Also think it is worth some tests otherwise there is no real code 
change/feature ;)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@openjpa.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to