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 5050972fcf093b1d308d6c9556277930318d47a8
Author: Walter B Duque de Estrada <[email protected]>
AuthorDate: Fri Jan 30 16:17:31 2026 -0600

    childEntities
---
 .../org/grails/orm/hibernate/cfg/GrailsDomainBinder.java    | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git 
a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
 
b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
index 5ef8d3c270..de0e44bbdb 100644
--- 
a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
+++ 
b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
@@ -1532,8 +1532,6 @@ public class GrailsDomainBinder
                 .toList();
 
 
-        List<Embedded> embedded = new ArrayList<>();
-
         for (PersistentProperty<?> currentGrailsProp : persistentProperties) {
             if (LOG.isDebugEnabled()) {
                 LOG.debug("[GrailsDomainBinder] Binding persistent property [" 
+ currentGrailsProp.getName() + "]");
@@ -1610,8 +1608,8 @@ public class GrailsDomainBinder
                     }
                 }
                 else if (currentGrailsProp instanceof Embedded) {
-                    embedded.add((Embedded)currentGrailsProp);
-                    continue;
+                    value = new Component(metadataBuildingContext, 
persistentClass);
+                    componentPropertyBinder.bindComponent((Component) value, 
(Embedded) currentGrailsProp, true, mappings, sessionFactoryBeanName);
                 }
             }
             // work out what type of relationship it is and bind value
@@ -1630,13 +1628,6 @@ public class GrailsDomainBinder
             }
         }
 
-        for (Embedded association : embedded) {
-            Value value = new Component(metadataBuildingContext, 
persistentClass);
-
-            componentPropertyBinder.bindComponent((Component) value, 
association, true, mappings, sessionFactoryBeanName);
-            Property property = propertyFromValueCreator.createProperty(value, 
association);
-            persistentClass.addProperty(property);
-        }
         new NaturalIdentifierBinder().bindNaturalIdentifier(gormMapping, 
persistentClass);
     }
 

Reply via email to