HHH-13214 Delete re-firing SQL from previous calls
This commit is contained in:
parent
3fcd4a00a2
commit
295eb870a3
|
@ -34,7 +34,7 @@ public abstract class AbstractInlineIdsDeleteHandlerImpl
|
|||
extends AbstractInlineIdsBulkIdHandler
|
||||
implements MultiTableBulkIdStrategy.DeleteHandler {
|
||||
|
||||
private List<String> deletes = new ArrayList<>();
|
||||
private List<String> deletes ;
|
||||
|
||||
public AbstractInlineIdsDeleteHandlerImpl(
|
||||
SessionFactoryImplementor factory,
|
||||
|
@ -44,7 +44,7 @@ public abstract class AbstractInlineIdsDeleteHandlerImpl
|
|||
|
||||
@Override
|
||||
public String[] getSqlStatements() {
|
||||
if ( deletes.isEmpty() ) {
|
||||
if ( deletes == null || deletes.isEmpty() ) {
|
||||
return ArrayHelper.EMPTY_STRING_ARRAY;
|
||||
}
|
||||
return deletes.toArray( new String[deletes.size()] );
|
||||
|
@ -56,6 +56,7 @@ public abstract class AbstractInlineIdsDeleteHandlerImpl
|
|||
QueryParameters queryParameters) {
|
||||
|
||||
IdsClauseBuilder values = prepareInlineStatement( session, queryParameters );
|
||||
deletes = new ArrayList<>();
|
||||
|
||||
if ( !values.getIds().isEmpty() ) {
|
||||
final String idSubselect = values.toStatement();
|
||||
|
|
Loading…
Reference in New Issue