Skip to content

Commit

Permalink
MCR-2647 fix JPA properties in MCRJPATestCase
Browse files Browse the repository at this point in the history
  • Loading branch information
yagee-de committed Oct 10, 2023
1 parent 64d3da8 commit fb0fcc1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ protected static void printResultSet(ResultSet resultSet, PrintStream out) throw

private static void exportSchema(String action) throws IOException {
Map<String, Object> schemaProperties = new HashMap<>();
schemaProperties.put("javax.persistence.schema-generation.database.action", action);
schemaProperties.put("jakarta.persistence.schema-generation.database.action", action);
try (StringWriter output = new StringWriter()) {
if (LogManager.getLogger().isDebugEnabled()) {
schemaProperties.put("javax.persistence.schema-generation.scripts.action", action);
schemaProperties.put("javax.persistence.schema-generation.scripts." + action + "-target", output);
schemaProperties.put("jakarta.persistence.schema-generation.scripts.action", action);
schemaProperties.put("jakarta.persistence.schema-generation.scripts." + action + "-target", output);
}
Persistence.generateSchema(getCurrentComponentName(), schemaProperties);
LogManager.getLogger().debug(() -> "invoked '" + action + "' sql script:\n" + output);
Expand Down

0 comments on commit fb0fcc1

Please sign in to comment.