HHH-16435 - Fix for issue (combine filterpredicates with potential already existing ones)
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
This commit is contained in:
parent
7f6b054a14
commit
4eef64f81e
|
@ -821,7 +821,7 @@ public abstract class BaseSqmToSqlAstConverter<T extends Statement> 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<T extends Statement> extends Base
|
|||
}
|
||||
|
||||
FilterHelper.applyBaseRestrictions(
|
||||
(filterPredicate) -> additionalRestrictions = filterPredicate,
|
||||
(filterPredicate) -> additionalRestrictions = combinePredicates( additionalRestrictions, filterPredicate),
|
||||
entityDescriptor,
|
||||
rootTableGroup,
|
||||
AbstractSqlAstTranslator.rendersTableReferenceAlias( Clause.DELETE ),
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue