diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/JoinedSubclassEntityPersister.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/JoinedSubclassEntityPersister.java index 9a396d66a5..a42c753a45 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/entity/JoinedSubclassEntityPersister.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/JoinedSubclassEntityPersister.java @@ -854,19 +854,7 @@ public class JoinedSubclassEntityPersister extends AbstractEntityPersister { throw new HibernateException( "Could not locate table which owns column [" + columnName + "] referenced in order-by mapping" ); } - public FilterAliasGenerator getFilterAliasGenerator(final String rootAlias) { - return new FilterAliasGenerator() { - @Override - public String getAlias(String table) { - if (table == null){ - return rootAlias; - } else{ - JoinedSubclassEntityPersister outer = JoinedSubclassEntityPersister.this; - int tableNumber = JoinedSubclassEntityPersister.getTableId(table, outer.subclassTableNameClosure); - return outer.generateTableAlias(rootAlias, tableNumber); - } - } - }; + @Override public FilterAliasGenerator getFilterAliasGenerator(String rootAlias) { return new DynamicFilterAliasGenerator(subclassTableNameClosure, rootAlias);