HHH-2394 Add support for SqlFragmentAlias.entity element

This commit is contained in:
Strong Liu 2012-07-12 23:30:01 +08:00
parent 5cb8d3a8b3
commit cef5f9a7cd
1 changed files with 1 additions and 13 deletions

View File

@ -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" ); 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 @Override
public FilterAliasGenerator getFilterAliasGenerator(String rootAlias) { public FilterAliasGenerator getFilterAliasGenerator(String rootAlias) {
return new DynamicFilterAliasGenerator(subclassTableNameClosure, rootAlias); return new DynamicFilterAliasGenerator(subclassTableNameClosure, rootAlias);