fix an NPE that occurred if a QL 'delete' statement had no predicate (#8190)
(bug exposed by Jakarta Data TCK) Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
parent
a7ad74f75f
commit
18c0fd7a78
|
@ -61,7 +61,8 @@ public abstract class AbstractSqmRestrictedDmlStatement<T> extends AbstractSqmDm
|
|||
}
|
||||
else {
|
||||
final SqmWhereClause whereClause = new SqmWhereClause( nodeBuilder() );
|
||||
whereClause.setPredicate( getWhereClause().getPredicate().copy( context ) );
|
||||
final SqmPredicate predicate = getWhereClause().getPredicate();
|
||||
whereClause.setPredicate( predicate==null ? null : predicate.copy( context ) );
|
||||
return whereClause;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue