diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java index 67adcaeb58..aac15f504a 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java @@ -821,7 +821,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base addVersionedAssignment( assignments::add, sqmStatement ); FilterHelper.applyBaseRestrictions( - (filterPredicate) -> additionalRestrictions = filterPredicate, + (filterPredicate) -> additionalRestrictions = combinePredicates( additionalRestrictions, filterPredicate), entityDescriptor, rootTableGroup, AbstractSqlAstTranslator.rendersTableReferenceAlias( Clause.UPDATE ), @@ -1078,7 +1078,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base } FilterHelper.applyBaseRestrictions( - (filterPredicate) -> additionalRestrictions = filterPredicate, + (filterPredicate) -> additionalRestrictions = combinePredicates( additionalRestrictions, filterPredicate), entityDescriptor, rootTableGroup, AbstractSqlAstTranslator.rendersTableReferenceAlias( Clause.DELETE ), diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/filter/subclass/singletable/SingleTableInheritanceFilterTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/filter/subclass/singletable/SingleTableInheritanceFilterTest.java index 7ecd696f52..c29acb5d16 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/filter/subclass/singletable/SingleTableInheritanceFilterTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/filter/subclass/singletable/SingleTableInheritanceFilterTest.java @@ -87,7 +87,7 @@ public class SingleTableInheritanceFilterTest { @Entity(name = "AbstractSuperClass") @DiscriminatorColumn(name = "DISC_COL", discriminatorType = DiscriminatorType.INTEGER) - @FilterDef(name = "dummy_filter", defaultCondition = "(ID IS NOT NULL)") + @FilterDef(name = "dummy_filter", defaultCondition = "(id IS NOT NULL)") @Filter(name = "dummy_filter") public static abstract class AbstractSuperClass { @Id