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 65ab4cfaf7298ea2b7cb25d8dc8b3a90e724cd46 Author: Walter Duque de Estrada <[email protected]> AuthorDate: Wed Feb 18 22:38:22 2026 -0600 Inject SimpleValueColumnBinder into CollectionSecondPassBinder --- .../cfg/domainbinding/binder/CollectionBinder.java | 3 ++- .../secondpass/CollectionSecondPassBinder.java | 16 +++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/binder/CollectionBinder.java b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/binder/CollectionBinder.java index e690bf8207..27e0d9978a 100644 --- a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/binder/CollectionBinder.java +++ b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/binder/CollectionBinder.java @@ -99,7 +99,8 @@ public class CollectionBinder { unidirectionalOneToManyBinder, collectionWithJoinTableBinder, collectionForPropertyConfigBinder, - new DefaultColumnNameFetcher(namingStrategy) + new DefaultColumnNameFetcher(namingStrategy), + new SimpleValueColumnBinder() ); this.listSecondPassBinder = new ListSecondPassBinder(metadataBuildingContext, namingStrategy, collectionSecondPassBinder); this.mapSecondPassBinder = new MapSecondPassBinder(metadataBuildingContext, namingStrategy, collectionSecondPassBinder); 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 cc6fc629d3..8b4f71022d 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 @@ -42,6 +42,7 @@ public class CollectionSecondPassBinder { private final UnidirectionalOneToManyBinder unidirectionalOneToManyBinder; private final CollectionWithJoinTableBinder collectionWithJoinTableBinder; private final CollectionForPropertyConfigBinder collectionForPropertyConfigBinder; + private final SimpleValueColumnBinder simpleValueColumnBinder; public CollectionSecondPassBinder( ManyToOneBinder manyToOneBinder, @@ -52,7 +53,8 @@ public class CollectionSecondPassBinder { UnidirectionalOneToManyBinder unidirectionalOneToManyBinder, CollectionWithJoinTableBinder collectionWithJoinTableBinder, CollectionForPropertyConfigBinder collectionForPropertyConfigBinder, - DefaultColumnNameFetcher defaultColumnNameFetcher) { + DefaultColumnNameFetcher defaultColumnNameFetcher, + SimpleValueColumnBinder simpleValueColumnBinder) { this.manyToOneBinder = manyToOneBinder; this.primaryKeyValueCreator = primaryKeyValueCreator; this.collectionKeyColumnUpdater = collectionKeyColumnUpdater; @@ -62,6 +64,7 @@ public class CollectionSecondPassBinder { this.collectionWithJoinTableBinder = collectionWithJoinTableBinder; this.collectionForPropertyConfigBinder = collectionForPropertyConfigBinder; this.defaultColumnNameFetcher = defaultColumnNameFetcher; + this.simpleValueColumnBinder = simpleValueColumnBinder; this.orderByClauseBuilder = new OrderByClauseBuilder(); } @@ -109,7 +112,7 @@ public class CollectionSecondPassBinder { } } else { if (property.getMappedForm().hasJoinKeyMapping()) { - new SimpleValueColumnBinder().bindSimpleValue(key, "long", property.getMappedForm().getJoinTable().getKey().getName(), true); + simpleValueColumnBinder.bindSimpleValue(key, "long", property.getMappedForm().getJoinTable().getKey().getName(), true); } else { dependentKeyValueBinder.bind(property, key); } @@ -136,13 +139,4 @@ public class CollectionSecondPassBinder { } collectionKeyColumnUpdater.forceNullableAndCheckUpdatable(key, property); } - - - - - - - - - }
