From 11455f34677fa0bc5dd5123977fd3a0849da6aea Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Thu, 5 Dec 2019 10:18:23 +0000 Subject: [PATCH] HHH-13752 - Deletion of entities with many-to-many assocations using non-primary keys for join table --- .../org/hibernate/hql/internal/ast/exec/DeleteExecutor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/exec/DeleteExecutor.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/exec/DeleteExecutor.java index 0c2aca1f22..2803aba90a 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/exec/DeleteExecutor.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/exec/DeleteExecutor.java @@ -85,7 +85,7 @@ public class DeleteExecutor extends BasicExecutor { for ( String propertyName : componentType.getPropertyNames() ) { Collections.addAll( columns, persister.toColumns( propertyName ) ); } - columnNames = columns.toArray( new String[columns.size()] ); + columnNames = columns.toArray( new String[0] ); } else { columnNames = persister.getIdentifierColumnNames();