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 6eb18ab7976ed872d0842247bf40df91e3865ebd
Author: Walter Duque de Estrada <[email protected]>
AuthorDate: Thu Feb 19 07:30:54 2026 -0600

    clean up injections
---
 .../orm/hibernate/cfg/domainbinding/binder/CollectionBinder.java   | 7 ++++---
 .../cfg/domainbinding/secondpass/ListSecondPassBinder.java         | 6 ++++--
 2 files changed, 8 insertions(+), 5 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 27e0d9978a..aca60c23da 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
@@ -78,6 +78,7 @@ public class CollectionBinder {
         GrailsPropertyResolver grailsPropertyResolver = new 
GrailsPropertyResolver();
         CollectionForPropertyConfigBinder collectionForPropertyConfigBinder = 
new CollectionForPropertyConfigBinder();
         UnidirectionalOneToManyInverseValuesBinder 
unidirectionalOneToManyInverseValuesBinder = new 
UnidirectionalOneToManyInverseValuesBinder();
+        SimpleValueColumnBinder simpleValueColumnBinder = new 
SimpleValueColumnBinder();
         CollectionWithJoinTableBinder collectionWithJoinTableBinder = new 
CollectionWithJoinTableBinder(
                 metadataBuildingContext,
                 namingStrategy,
@@ -86,7 +87,7 @@ public class CollectionBinder {
                 compositeIdentifierToManyToOneBinder,
                 simpleValueColumnFetcher,
                 collectionForPropertyConfigBinder,
-                new SimpleValueColumnBinder(),
+                simpleValueColumnBinder,
                 new ColumnConfigToColumnBinder()
         );
         this.unidirectionalOneToManyBinder = new 
UnidirectionalOneToManyBinder(collectionWithJoinTableBinder);
@@ -100,9 +101,9 @@ public class CollectionBinder {
                 collectionWithJoinTableBinder,
                 collectionForPropertyConfigBinder,
                 new DefaultColumnNameFetcher(namingStrategy),
-                new SimpleValueColumnBinder()
+                simpleValueColumnBinder
         );
-        this.listSecondPassBinder = new 
ListSecondPassBinder(metadataBuildingContext, namingStrategy, 
collectionSecondPassBinder);
+        this.listSecondPassBinder = new 
ListSecondPassBinder(metadataBuildingContext, namingStrategy, 
collectionSecondPassBinder, simpleValueColumnBinder);
         this.mapSecondPassBinder = new 
MapSecondPassBinder(metadataBuildingContext, namingStrategy, 
collectionSecondPassBinder);
     }
 
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 36a0634b79..aaec448902 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
@@ -36,12 +36,14 @@ public class ListSecondPassBinder {
     private final MetadataBuildingContext metadataBuildingContext;
     private final CollectionSecondPassBinder collectionSecondPassBinder;
     private final PersistentEntityNamingStrategy namingStrategy;
+    private final SimpleValueColumnBinder simpleValueColumnBinder;
 
     public ListSecondPassBinder(MetadataBuildingContext metadataBuildingContext
-            , PersistentEntityNamingStrategy namingStrategy, 
CollectionSecondPassBinder collectionSecondPassBinder) {
+            , PersistentEntityNamingStrategy namingStrategy, 
CollectionSecondPassBinder collectionSecondPassBinder, SimpleValueColumnBinder 
simpleValueColumnBinder) {
         this.metadataBuildingContext = metadataBuildingContext;
         this.collectionSecondPassBinder = collectionSecondPassBinder;
         this.namingStrategy = namingStrategy;
+        this.simpleValueColumnBinder = simpleValueColumnBinder;
     }
 
     public void bindListSecondPass(@Nonnull HibernateToManyProperty property, 
@Nonnull InFlightMetadataCollector mappings,
@@ -59,7 +61,7 @@ public class ListSecondPassBinder {
         Table collectionTable = list.getCollectionTable();
         SimpleValue iv = new BasicValue(metadataBuildingContext, 
collectionTable);
         String type = property.getIndexColumnType("integer");
-        new SimpleValueColumnBinder().bindSimpleValue(iv, type, columnName, 
true);
+        simpleValueColumnBinder.bindSimpleValue(iv, type, columnName, true);
         iv.setTypeName(type);
         list.setIndex(iv);
         list.setBaseIndex(0);

Reply via email to