Skip to content

Commit

Permalink
Use getSubclassTableSpan instead of getTableSpan, fixes #521
Browse files Browse the repository at this point in the history
  • Loading branch information
jwgmeligmeyling authored and beikov committed Mar 7, 2018
1 parent 5306122 commit 4522030
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -483,17 +483,17 @@ public String[] getColumnTypes(EntityType<?> entityType, String attributeName) {
Table[] tables;

if (entityPersister instanceof JoinedSubclassEntityPersister) {
tables = new Table[((JoinedSubclassEntityPersister) entityPersister).getTableSpan()];
tables = new Table[((JoinedSubclassEntityPersister) entityPersister).getSubclassTableSpan()];
for (int i = 0; i < tables.length; i++) {
tables[i] = database.getTable(entityPersister.getSubclassTableName(i));
}
} else if (entityPersister instanceof UnionSubclassEntityPersister) {
tables = new Table[((UnionSubclassEntityPersister) entityPersister).getTableSpan()];
tables = new Table[((UnionSubclassEntityPersister) entityPersister).getSubclassTableSpan()];
for (int i = 0; i < tables.length; i++) {
tables[i] = database.getTable(entityPersister.getSubclassTableName(i));
}
} else if (entityPersister instanceof SingleTableEntityPersister) {
tables = new Table[((SingleTableEntityPersister) entityPersister).getTableSpan()];
tables = new Table[((SingleTableEntityPersister) entityPersister).getSubclassTableSpan()];
for (int i = 0; i < tables.length; i++) {
tables[i] = database.getTable(entityPersister.getSubclassTableName(i));
}
Expand Down

0 comments on commit 4522030

Please sign in to comment.