HHH-14585 Handle filter fragment on CollectionSizeNode

This commit is contained in:
Fabio Massimo Ercoli 2021-05-11 09:06:56 +02:00
parent 15d9eb4112
commit a106ce29dc
1 changed files with 3 additions and 0 deletions

View File

@ -12,6 +12,7 @@ import org.hibernate.hql.internal.antlr.HqlSqlTokenTypes;
import org.hibernate.internal.util.StringHelper;
import org.hibernate.persister.collection.CollectionPropertyMapping;
import org.hibernate.persister.collection.CollectionPropertyNames;
import org.hibernate.persister.collection.OneToManyPersister;
import org.hibernate.persister.collection.QueryableCollection;
import org.hibernate.type.StandardBasicTypes;
@ -89,6 +90,8 @@ public class CollectionSizeNode extends SqlNode implements SelectExpression {
buffer.append( ownerKeyColumns[i] ).append( " = " ).append( collectionKeyColumns[i] );
}
buffer.append( collectionDescriptor.filterFragment( collectionTableAlias,
collectionOwnerFromElement.getWalker().getEnabledFilters() ) );
buffer.append( ")" );
if ( scalarName != null ) {