Skip to content

Commit

Permalink
Test fix for dbs that use lowercasing in the metadata call
Browse files Browse the repository at this point in the history
  • Loading branch information
jbarrez committed Jul 17, 2024
1 parent 646e84a commit 9998729
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,17 @@ private String findTable(String entity, String mappingFileContent) {
}

protected Map<String, String> getColumnMetaData(String tableName) {
Map<String, String> result = internalGetColumnMetaData(tableName);

if (result.isEmpty()) { // certain dbs such as postgres / mysql 5.x only can do lowercased metadata calls
result = internalGetColumnMetaData(tableName.toLowerCase(Locale.ROOT));
}

return result;
}


protected Map<String, String> internalGetColumnMetaData(String tableName) {
return processEngine.getManagementService().executeCommand(commandContext -> {
try {
DbSqlSession dbSqlSession = commandContext.getSession(DbSqlSession.class);
Expand Down

0 comments on commit 9998729

Please sign in to comment.