Skip to content

Commit 15f2fd2

Browse files
author
Igor Polevoy
committed
#144 Same table name in different schemas with PostgreSQL
1 parent 93feaee commit 15f2fd2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

activejdbc/src/main/java/org/javalite/activejdbc/Registry.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ private Map<String, ColumnMetadata> fetchMetaParams(DatabaseMetaData databaseMet
185185
throw new DBException("invalid table name: " + table);
186186
}
187187

188+
try {
189+
schema = databaseMetaData.getConnection().getSchema();
190+
} catch (AbstractMethodError ignore) {}
191+
188192
if (tableName.startsWith("\"") && tableName.endsWith("\"")) {
189193
tableName = tableName.substring(1, tableName.length() - 1);
190194
}

0 commit comments

Comments
 (0)