You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by GitBox <gi...@apache.org> on 2021/11/23 02:40:37 UTC

[GitHub] [openjpa] solomax commented on a change in pull request #89: orm* schemas are available offline

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



##########
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'm not sure about this




-- 
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-unsubscribe@openjpa.apache.org

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