This is an automated email from the ASF dual-hosted git repository.

borinquenkid pushed a commit to branch 8.0.x-hibernate7
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit 11e52392c3fa6958b8e6170e489b9b6a2e01e7dd
Author: Walter Duque de Estrada <[email protected]>
AuthorDate: Thu Jun 18 17:23:45 2026 -0500

    Revert unnecessary empty-map params in test-example executeUpdate calls
    
    The single-argument form executeUpdate('HQL') is sufficient when there are
    no named parameters; the [:]  added in the H7 integration work is redundant.
    Restores the original call sites so the reviewer's question is addressed.
    
    Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---
 .../groovy/gorm/GormCriteriaQueriesSpec.groovy               | 12 ++++++------
 .../integration-test/groovy/gorm/GormDataServicesSpec.groovy |  4 ++--
 .../src/integration-test/groovy/gorm/GormEventsSpec.groovy   |  2 +-
 .../groovy/gorm/GormWhereQueryAdvancedSpec.groovy            |  4 ++--
 .../groovy/gorm/TransactionPropagationSpec.groovy            |  4 ++--
 .../gorm/TransactionalWhereQueryVariableScopeSpec.groovy     |  4 ++--
 .../DataServiceDatasourceInheritanceSpec.groovy              |  2 +-
 .../functionaltests/DataServiceMultiDataSourceSpec.groovy    |  2 +-
 .../grails-app/services/example/MetricService.groovy         |  2 +-
 9 files changed, 18 insertions(+), 18 deletions(-)

diff --git 
a/grails-test-examples/gorm/src/integration-test/groovy/gorm/GormCriteriaQueriesSpec.groovy
 
b/grails-test-examples/gorm/src/integration-test/groovy/gorm/GormCriteriaQueriesSpec.groovy
index bab7dcd742..b73c87d977 100644
--- 
a/grails-test-examples/gorm/src/integration-test/groovy/gorm/GormCriteriaQueriesSpec.groovy
+++ 
b/grails-test-examples/gorm/src/integration-test/groovy/gorm/GormCriteriaQueriesSpec.groovy
@@ -37,8 +37,8 @@ class GormCriteriaQueriesSpec extends Specification {
 
     def setup() {
         // Clean up and create fresh test data
-        Book.executeUpdate('delete from Book', [:])
-        Author.executeUpdate('delete from Author', [:])
+        Book.executeUpdate('delete from Book')
+        Author.executeUpdate('delete from Author')
 
         def kingAuthor = new Author(name: 'Stephen King', email: 
'[email protected]').save(flush: true)
         def clancyAuthor = new Author(name: 'Tom Clancy', email: 
'[email protected]').save(flush: true)
@@ -489,7 +489,7 @@ class GormCriteriaQueriesSpec extends Specification {
     // ============================================
 
     void "test basic HQL query"() {
-        when: "executing a plain String HQL query with no parameters"
+        when: "executing HQL query"
         def results = Book.executeQuery("from Book where inStock = true")
 
         then: "results returned"
@@ -545,7 +545,7 @@ class GormCriteriaQueriesSpec extends Specification {
     void "test HQL aggregate functions"() {
         when: "executing HQL aggregates"
         def result = Book.executeQuery(
-            'select count(b), avg(b.price), max(b.pageCount) from Book b', [:]
+            'select count(b), avg(b.price), max(b.pageCount) from Book b'
         )[0]
 
         then: "aggregates calculated"
@@ -557,7 +557,7 @@ class GormCriteriaQueriesSpec extends Specification {
     void "test HQL group by"() {
         when: "executing HQL group by"
         def results = Book.executeQuery(
-            'select a.name, count(b) from Book b join b.author a group by 
a.name order by count(b) desc', [:]
+            'select a.name, count(b) from Book b join b.author a group by 
a.name order by count(b) desc'
         )
 
         then: "grouped results"
@@ -569,7 +569,7 @@ class GormCriteriaQueriesSpec extends Specification {
     void "test executeUpdate for bulk operations"() {
         when: "executing bulk update"
         int updated = Book.executeUpdate(
-            'update Book b set b.price = b.price * 1.1 where b.inStock = 
true', [:]
+            'update Book b set b.price = b.price * 1.1 where b.inStock = true'
         )
 
         then: "bulk update applied"
diff --git 
a/grails-test-examples/gorm/src/integration-test/groovy/gorm/GormDataServicesSpec.groovy
 
b/grails-test-examples/gorm/src/integration-test/groovy/gorm/GormDataServicesSpec.groovy
index b8625820ca..277fe14220 100644
--- 
a/grails-test-examples/gorm/src/integration-test/groovy/gorm/GormDataServicesSpec.groovy
+++ 
b/grails-test-examples/gorm/src/integration-test/groovy/gorm/GormDataServicesSpec.groovy
@@ -48,8 +48,8 @@ class GormDataServicesSpec extends Specification {
 
     def setup() {
         // Clean up and create fresh test data
-        Book.executeUpdate('delete from Book', [:])
-        Author.executeUpdate('delete from Author', [:])
+        Book.executeUpdate('delete from Book')
+        Author.executeUpdate('delete from Author')
 
         def author = new Author(name: 'Stephen King', email: 
'[email protected]').save(flush: true)
 
diff --git 
a/grails-test-examples/gorm/src/integration-test/groovy/gorm/GormEventsSpec.groovy
 
b/grails-test-examples/gorm/src/integration-test/groovy/gorm/GormEventsSpec.groovy
index 43cc06e984..2f9dd463bb 100644
--- 
a/grails-test-examples/gorm/src/integration-test/groovy/gorm/GormEventsSpec.groovy
+++ 
b/grails-test-examples/gorm/src/integration-test/groovy/gorm/GormEventsSpec.groovy
@@ -42,7 +42,7 @@ import grails.testing.mixin.integration.Integration
 class GormEventsSpec extends Specification {
 
     def setup() {
-        AuditedEntity.executeUpdate('delete from AuditedEntity', [:])
+        AuditedEntity.executeUpdate('delete from AuditedEntity')
     }
 
     // ============================================
diff --git 
a/grails-test-examples/gorm/src/integration-test/groovy/gorm/GormWhereQueryAdvancedSpec.groovy
 
b/grails-test-examples/gorm/src/integration-test/groovy/gorm/GormWhereQueryAdvancedSpec.groovy
index cdfafab806..c7d339dc55 100644
--- 
a/grails-test-examples/gorm/src/integration-test/groovy/gorm/GormWhereQueryAdvancedSpec.groovy
+++ 
b/grails-test-examples/gorm/src/integration-test/groovy/gorm/GormWhereQueryAdvancedSpec.groovy
@@ -39,8 +39,8 @@ class GormWhereQueryAdvancedSpec extends Specification {
 
     def setup() {
         // Clean up existing data
-        Book.executeUpdate('delete from Book', [:])
-        Author.executeUpdate('delete from Author', [:])
+        Book.executeUpdate('delete from Book')
+        Author.executeUpdate('delete from Author')
 
         // Create test authors
         def king = new Author(name: 'Stephen King', email: 
'[email protected]').save(flush: true)
diff --git 
a/grails-test-examples/gorm/src/integration-test/groovy/gorm/TransactionPropagationSpec.groovy
 
b/grails-test-examples/gorm/src/integration-test/groovy/gorm/TransactionPropagationSpec.groovy
index 8304bfa240..a60e1678de 100644
--- 
a/grails-test-examples/gorm/src/integration-test/groovy/gorm/TransactionPropagationSpec.groovy
+++ 
b/grails-test-examples/gorm/src/integration-test/groovy/gorm/TransactionPropagationSpec.groovy
@@ -44,8 +44,8 @@ class TransactionPropagationSpec extends Specification {
     def setup() {
         // Clean up before each test - delete books first due to FK constraint
         Author.withNewTransaction {
-            Book.executeUpdate('delete from Book', [:])
-            Author.executeUpdate('delete from Author', [:])
+            Book.executeUpdate('delete from Book')
+            Author.executeUpdate('delete from Author')
         }
     }
 
diff --git 
a/grails-test-examples/gorm/src/integration-test/groovy/gorm/TransactionalWhereQueryVariableScopeSpec.groovy
 
b/grails-test-examples/gorm/src/integration-test/groovy/gorm/TransactionalWhereQueryVariableScopeSpec.groovy
index 20f9a56bd3..972812ded2 100644
--- 
a/grails-test-examples/gorm/src/integration-test/groovy/gorm/TransactionalWhereQueryVariableScopeSpec.groovy
+++ 
b/grails-test-examples/gorm/src/integration-test/groovy/gorm/TransactionalWhereQueryVariableScopeSpec.groovy
@@ -45,8 +45,8 @@ class TransactionalWhereQueryVariableScopeSpec extends 
Specification {
     WhereQueryVariableScopeService whereQueryVariableScopeService
 
     def setup() {
-        Book.executeUpdate('delete from Book', [:])
-        Author.executeUpdate('delete from Author', [:])
+        Book.executeUpdate('delete from Book')
+        Author.executeUpdate('delete from Author')
 
         def king = new Author(name: 'Stephen King', email: 
'[email protected]').save(flush: true)
         def clancy = new Author(name: 'Tom Clancy', email: 
'[email protected]').save(flush: true)
diff --git 
a/grails-test-examples/hibernate7/grails-data-service-multi-datasource/src/integration-test/groovy/functionaltests/DataServiceDatasourceInheritanceSpec.groovy
 
b/grails-test-examples/hibernate7/grails-data-service-multi-datasource/src/integration-test/groovy/functionaltests/DataServiceDatasourceInheritanceSpec.groovy
index 63e7653870..e7885e199e 100644
--- 
a/grails-test-examples/hibernate7/grails-data-service-multi-datasource/src/integration-test/groovy/functionaltests/DataServiceDatasourceInheritanceSpec.groovy
+++ 
b/grails-test-examples/hibernate7/grails-data-service-multi-datasource/src/integration-test/groovy/functionaltests/DataServiceDatasourceInheritanceSpec.groovy
@@ -34,7 +34,7 @@ class DataServiceDatasourceInheritanceSpec extends 
Specification {
 
     void cleanup() {
         Product.secondary.withTransaction {
-            Product.secondary.executeUpdate('delete from Product', [:])
+            Product.secondary.executeUpdate('delete from Product')
         }
     }
 
diff --git 
a/grails-test-examples/hibernate7/grails-data-service-multi-datasource/src/integration-test/groovy/functionaltests/DataServiceMultiDataSourceSpec.groovy
 
b/grails-test-examples/hibernate7/grails-data-service-multi-datasource/src/integration-test/groovy/functionaltests/DataServiceMultiDataSourceSpec.groovy
index afe7c3b8e4..5194e0bf7f 100644
--- 
a/grails-test-examples/hibernate7/grails-data-service-multi-datasource/src/integration-test/groovy/functionaltests/DataServiceMultiDataSourceSpec.groovy
+++ 
b/grails-test-examples/hibernate7/grails-data-service-multi-datasource/src/integration-test/groovy/functionaltests/DataServiceMultiDataSourceSpec.groovy
@@ -56,7 +56,7 @@ class DataServiceMultiDataSourceSpec extends Specification {
 
     void cleanup() {
         Product.secondary.withTransaction {
-            Product.secondary.executeUpdate('delete from Product', [:])
+            Product.secondary.executeUpdate('delete from Product')
         }
     }
 
diff --git 
a/grails-test-examples/hibernate7/grails-multitenant-multi-datasource/grails-app/services/example/MetricService.groovy
 
b/grails-test-examples/hibernate7/grails-multitenant-multi-datasource/grails-app/services/example/MetricService.groovy
index 32f9088420..7607d7e6eb 100644
--- 
a/grails-test-examples/hibernate7/grails-multitenant-multi-datasource/grails-app/services/example/MetricService.groovy
+++ 
b/grails-test-examples/hibernate7/grails-multitenant-multi-datasource/grails-app/services/example/MetricService.groovy
@@ -60,6 +60,6 @@ abstract class MetricService {
      * Delete all metrics for the current tenant from the secondary datasource.
      */
     void deleteAll() {
-        secondaryApi.executeUpdate('delete from Metric', [:])
+        secondaryApi.executeUpdate('delete from Metric')
     }
 }

Reply via email to