solomax commented on code in PR #197:
URL: https://github.com/apache/openjpa/pull/197#discussion_r4119154498
##########
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/compat/TestContainerSpecCompatibilityOptions.java:
##########
@@ -442,6 +442,46 @@ public void testOneToManyMapRelation() {
}
}
+ /*
+ * With the compatibility option UseSpecDefaultMapKeyColumnName disabled
the
+ * pre-4.2.0 map key column name "KEY" (usually "KEY0", as "KEY" is a
+ * reserved word) must be used again, so that schemas created by earlier
+ * releases keep working.
+ */
+ public void testLegacyDefaultMapKeyColumnName() {
+ List<Class<?>> types = new ArrayList<>();
+ types.add(Uni_Map_KeyCol.class);
+ Map<String,Object> props = new HashMap<>();
+ props.put("openjpa.Compatibility",
"UseSpecDefaultMapKeyColumnName=false");
+ OpenJPAEntityManagerFactorySPI emf = createEMF2_0(types, props);
+ EntityManager em = emf.createEntityManager();
+
+ try {
Review Comment:
`try-with-resource`? :)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]