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 7189bc604bfe8f48d952ceca506a6daff964616e Author: Walter Duque de Estrada <[email protected]> AuthorDate: Fri Feb 13 14:43:22 2026 -0600 refactored SimpleIdBinder by removing the 5-argument public constructor and updating the 3-argument constructor to initialize its fields directly. Additionally, I resolved compilation errors in ListSecondPassBinder.java and CollectionSecondPassBinder.java by updating setUpdatable calls to setUpdateable for DependantValue objects, ensuring compatibility with Hibernate --- .../cfg/domainbinding/binder/SimpleIdBinder.java | 16 ++++++---------- .../secondpass/CollectionSecondPassBinder.java | 6 +++--- .../domainbinding/secondpass/ListSecondPassBinder.java | 2 +- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/binder/SimpleIdBinder.java b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/binder/SimpleIdBinder.java index 7ee4dee38f..63ec419a4a 100644 --- a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/binder/SimpleIdBinder.java +++ b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/binder/SimpleIdBinder.java @@ -29,10 +29,14 @@ public class SimpleIdBinder { private final BasicValueIdCreator basicValueIdCreator; public SimpleIdBinder(MetadataBuildingContext metadataBuildingContext, PersistentEntityNamingStrategy namingStrategy, JdbcEnvironment jdbcEnvironment) { - this(metadataBuildingContext, jdbcEnvironment, new SimpleValueBinder(namingStrategy), new PropertyBinder(), null); + this.metadataBuildingContext = metadataBuildingContext; + this.jdbcEnvironment = jdbcEnvironment; + this.simpleValueBinder = new SimpleValueBinder(namingStrategy); + this.propertyBinder = new PropertyBinder(); + this.basicValueIdCreator = null; } - public SimpleIdBinder(BasicValueIdCreator basicValueIdCreator, SimpleValueBinder simpleValueBinder, PropertyBinder propertyBinder) { + protected SimpleIdBinder(BasicValueIdCreator basicValueIdCreator, SimpleValueBinder simpleValueBinder, PropertyBinder propertyBinder) { this.metadataBuildingContext = null; this.jdbcEnvironment = null; this.simpleValueBinder = simpleValueBinder; @@ -40,14 +44,6 @@ public class SimpleIdBinder { this.basicValueIdCreator = basicValueIdCreator; } - protected SimpleIdBinder(MetadataBuildingContext metadataBuildingContext, JdbcEnvironment jdbcEnvironment, SimpleValueBinder simpleValueBinder, PropertyBinder propertyBinder, BasicValueIdCreator basicValueIdCreator) { - this.metadataBuildingContext = metadataBuildingContext; - this.jdbcEnvironment = jdbcEnvironment; - this.simpleValueBinder = simpleValueBinder; - this.propertyBinder = propertyBinder; - this.basicValueIdCreator = basicValueIdCreator; - } - public void bindSimpleId(@Nonnull GrailsHibernatePersistentEntity domainClass, RootClass entity, Identity mappedId) { diff --git a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/secondpass/CollectionSecondPassBinder.java b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/secondpass/CollectionSecondPassBinder.java index 7c8e55b87f..c53b7698b8 100644 --- a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/secondpass/CollectionSecondPassBinder.java +++ b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/secondpass/CollectionSecondPassBinder.java @@ -426,9 +426,9 @@ public class CollectionSecondPassBinder { } if (unidirectionalCount > 1) { - key.setUpdatable(false); + key.setUpdateable(false); } else { - key.setUpdatable(true); + key.setUpdateable(true); } } @@ -450,7 +450,7 @@ public class CollectionSecondPassBinder { key = new DependantValue(metadataBuildingContext, collection.getCollectionTable(), keyValue); key.setTypeName(null); key.setNullable(true); - key.setUpdatable(true); + key.setUpdateable(true); //JPA now requires to check for sorting key.setSorted(collection.isSorted()); diff --git a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/secondpass/ListSecondPassBinder.java b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/secondpass/ListSecondPassBinder.java index 05e3cbe9b8..c9eed1ffee 100644 --- a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/secondpass/ListSecondPassBinder.java +++ b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/secondpass/ListSecondPassBinder.java @@ -99,7 +99,7 @@ public class ListSecondPassBinder { if (!property.isCircular()) { value.setNullable(false); } - value.setUpdatable(true); + value.setUpdateable(true); prop.setOptional(false); referenced.addProperty(prop);
