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 c9e5c60b6a8a5c8df3e82ba5919904c3d926b246 Author: Walter Duque de Estrada <[email protected]> AuthorDate: Thu Feb 19 13:18:45 2026 -0600 Generate HibernateCriteriaBuilderSpec and move to correct package --- .../orm}/HibernateCriteriaBuilderSpec.groovy | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/HibernateCriteriaBuilderSpec.groovy b/grails-data-hibernate7/core/src/test/groovy/grails/orm/HibernateCriteriaBuilderSpec.groovy similarity index 93% rename from grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/HibernateCriteriaBuilderSpec.groovy rename to grails-data-hibernate7/core/src/test/groovy/grails/orm/HibernateCriteriaBuilderSpec.groovy index 77e43baef9..d8ea1cf885 100644 --- a/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/HibernateCriteriaBuilderSpec.groovy +++ b/grails-data-hibernate7/core/src/test/groovy/grails/orm/HibernateCriteriaBuilderSpec.groovy @@ -1,9 +1,7 @@ -package org.grails.orm.hibernate +package grails.orm import grails.gorm.annotation.Entity import grails.gorm.specs.HibernateGormDatastoreSpec -import grails.orm.HibernateCriteriaBuilder - import java.math.RoundingMode class HibernateCriteriaBuilderSpec extends HibernateGormDatastoreSpec { @@ -26,7 +24,7 @@ class HibernateCriteriaBuilderSpec extends HibernateGormDatastoreSpec { fred.save() barney.addToTransactions(new Transaction(amount: 50)) - barney.save(flush: true,failOnError: true) + barney.save(flush: true, failOnError: true) builder = new HibernateCriteriaBuilder(Account, manager.hibernateDatastore.sessionFactory, manager.hibernateDatastore) } @@ -153,7 +151,7 @@ class HibernateCriteriaBuilderSpec extends HibernateGormDatastoreSpec { le("balance", BigDecimal.valueOf(1000)) } then: - results*.firstName.toSet() == ["Barney","Wilma","Pebbles"] as Set + results*.firstName.toSet() == ["Barney", "Wilma", "Pebbles"] as Set } void "test isNotNull and size constraints on association"() { @@ -163,7 +161,7 @@ class HibernateCriteriaBuilderSpec extends HibernateGormDatastoreSpec { sizeGe("transactions", 1) } then: - results*.firstName.toSet() == ["Fred","Barney"] as Set + results*.firstName.toSet() == ["Fred", "Barney"] as Set } void "test property to property comparisons and ordering desc"() { @@ -209,11 +207,11 @@ class HibernateCriteriaBuilderSpec extends HibernateGormDatastoreSpec { paged.size() == 1 paged[0].firstName == "Fred" } - + void "test eq with ignoreCase param path and like/ilike methods"() { when: def results = builder.list { - eq("firstName", "Fr", [ignoreCase:true]) // should fallback to like with %Fr% + eq("firstName", "Fr", [ignoreCase: true]) // should fallback to like with %Fr% } def likeRes = builder.list { like("branch", "%Bedrock%") @@ -224,7 +222,7 @@ class HibernateCriteriaBuilderSpec extends HibernateGormDatastoreSpec { then: results instanceof List likeRes.size() >= 1 - ilikeRes.size() >= 1 + ilikeRes.size() >= 1 } } @@ -238,7 +236,7 @@ class Account { static hasMany = [transactions: Transaction] static constraints = { - branch nullable:true + branch nullable: true } }
