You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by bo...@apache.org on 2026/10/21 01:13:56 UTC
(grails-core) branch 9.0.x-h7-improvement-phase3 updated (78452dd84f -> 59b07cf64e)
This is an automated email from the ASF dual-hosted git repository.
borinquenkid pushed a change to branch 9.0.x-h7-improvement-phase3
in repository https://gitbox.apache.org/repos/asf/grails-core.git
from 78452dd84f test(hibernate7): record the classic oracle for the #16686 fixtures
add ea090f3b85 refactor(hibernate7): move the facets records of the generator to a facets subpackage
add 5fe4df69a1 docs(hibernate7): name the entry points of native domain binding
add 40379e4e5f Merge branch 'nb/16568-merge-h7' into nb/16569-merge
new 59b07cf64e Merge branch 'nb/16569-merge' into nb/16570-merge
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.agents/skills/hibernate-developer/SKILL.md | 11 +++++
.../jpa/GeneratedDomainClassBinder.groovy | 11 ++++-
.../domainbinding/jpa/GrailsDomainGenerator.groovy | 25 +++++++++++-
.../jpa/{ => facets}/CacheFacets.groovy | 4 +-
.../jpa/{ => facets}/CascadeFacets.groovy | 2 +-
.../jpa/{ => facets}/CollectionFacets.groovy | 6 +--
.../jpa/{ => facets}/CollectionKind.groovy | 2 +-
.../jpa/{ => facets}/ColumnFacets.groovy | 4 +-
.../{ => facets}/CompositeAttributeFacets.groovy | 2 +-
.../jpa/{ => facets}/CompositeIdFacets.groovy | 4 +-
.../{ => facets}/CompositeUserTypeFacets.groovy | 2 +-
.../jpa/{ => facets}/ConstraintFacets.groovy | 4 +-
.../jpa/{ => facets}/DiscriminatorFacets.groovy | 2 +-
.../jpa/{ => facets}/EmbeddedLeaf.groovy | 2 +-
.../jpa/{ => facets}/EntityFacets.groovy | 4 +-
.../jpa/{ => facets}/HierarchyFacets.groovy | 2 +-
.../domainbinding/jpa/{ => facets}/IdFacets.groovy | 2 +-
.../jpa/{ => facets}/IndexFacets.groovy | 4 +-
.../jpa/{ => facets}/NaturalIdFacets.groovy | 4 +-
.../jpa/{ => facets}/TenantFacets.groovy | 4 +-
.../jpa/{ => facets}/ToManyFacets.groovy | 6 +--
.../jpa/{ => facets}/ToOneFacets.groovy | 4 +-
.../jpa/{ => facets}/TypeFacets.groovy | 2 +-
.../jpa/{ => facets}/UniqueKeyFacets.groovy | 4 +-
.../cfg/domainbinding/jpa/package-info.java | 47 ++++++++++++++++++++++
.../cfg/domainbinding/jpa/ClassicFacts.groovy | 1 +
.../jpa/GrailsDomainGeneratorCacheSpec.groovy | 1 +
.../GrailsDomainGeneratorDifferentialSpec.groovy | 27 +++++++++++--
.../jpa/GrailsDomainGeneratorIndexSpec.groovy | 2 +
.../jpa/GrailsDomainGeneratorNaturalIdSpec.groovy | 1 +
.../GrailsDomainGeneratorOptionCoverageSpec.groovy | 3 ++
.../jpa/GrailsDomainGeneratorSpec.groovy | 26 +++++++-----
.../jpa/GrailsDomainGeneratorTenantSpec.groovy | 1 +
.../GrailsDomainGeneratorUniqueGroupSpec.groovy | 1 +
34 files changed, 176 insertions(+), 51 deletions(-)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/CacheFacets.groovy (92%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/CascadeFacets.groovy (96%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/CollectionFacets.groovy (95%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/CollectionKind.groovy (96%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/ColumnFacets.groovy (92%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/CompositeAttributeFacets.groovy (95%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/CompositeIdFacets.groovy (92%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/CompositeUserTypeFacets.groovy (95%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/ConstraintFacets.groovy (93%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/DiscriminatorFacets.groovy (97%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/EmbeddedLeaf.groovy (96%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/EntityFacets.groovy (92%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/HierarchyFacets.groovy (96%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/IdFacets.groovy (95%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/IndexFacets.groovy (89%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/NaturalIdFacets.groovy (90%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/TenantFacets.groovy (92%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/ToManyFacets.groovy (97%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/ToOneFacets.groovy (96%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/TypeFacets.groovy (97%)
rename grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/{ => facets}/UniqueKeyFacets.groovy (89%)
create mode 100644 grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/package-info.java
(grails-core) 01/01: Merge branch 'nb/16569-merge' into nb/16570-merge
Posted by bo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
borinquenkid pushed a commit to branch 9.0.x-h7-improvement-phase3
in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit 59b07cf64e767c316c7d2c5569b80818f96014c6
Merge: 78452dd84f 40379e4e5f
Author: Walter Duque de Estrada <wb...@mac.com>
AuthorDate: Tue Oct 20 19:52:48 2026 -0500
Merge branch 'nb/16569-merge' into nb/16570-merge
# Conflicts:
# .agents/skills/hibernate-developer/SKILL.md
# grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GrailsDomainGeneratorDifferentialSpec.groovy
# grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GrailsDomainGeneratorSpec.groovy
.agents/skills/hibernate-developer/SKILL.md | 11 +++++
.../jpa/GeneratedDomainClassBinder.groovy | 11 ++++-
.../domainbinding/jpa/GrailsDomainGenerator.groovy | 25 +++++++++++-
.../jpa/{ => facets}/CacheFacets.groovy | 4 +-
.../jpa/{ => facets}/CascadeFacets.groovy | 2 +-
.../jpa/{ => facets}/CollectionFacets.groovy | 6 +--
.../jpa/{ => facets}/CollectionKind.groovy | 2 +-
.../jpa/{ => facets}/ColumnFacets.groovy | 4 +-
.../{ => facets}/CompositeAttributeFacets.groovy | 2 +-
.../jpa/{ => facets}/CompositeIdFacets.groovy | 4 +-
.../{ => facets}/CompositeUserTypeFacets.groovy | 2 +-
.../jpa/{ => facets}/ConstraintFacets.groovy | 4 +-
.../jpa/{ => facets}/DiscriminatorFacets.groovy | 2 +-
.../jpa/{ => facets}/EmbeddedLeaf.groovy | 2 +-
.../jpa/{ => facets}/EntityFacets.groovy | 4 +-
.../jpa/{ => facets}/HierarchyFacets.groovy | 2 +-
.../domainbinding/jpa/{ => facets}/IdFacets.groovy | 2 +-
.../jpa/{ => facets}/IndexFacets.groovy | 4 +-
.../jpa/{ => facets}/NaturalIdFacets.groovy | 4 +-
.../jpa/{ => facets}/TenantFacets.groovy | 4 +-
.../jpa/{ => facets}/ToManyFacets.groovy | 6 +--
.../jpa/{ => facets}/ToOneFacets.groovy | 4 +-
.../jpa/{ => facets}/TypeFacets.groovy | 2 +-
.../jpa/{ => facets}/UniqueKeyFacets.groovy | 4 +-
.../cfg/domainbinding/jpa/package-info.java | 47 ++++++++++++++++++++++
.../cfg/domainbinding/jpa/ClassicFacts.groovy | 1 +
.../jpa/GrailsDomainGeneratorCacheSpec.groovy | 1 +
.../GrailsDomainGeneratorDifferentialSpec.groovy | 27 +++++++++++--
.../jpa/GrailsDomainGeneratorIndexSpec.groovy | 2 +
.../jpa/GrailsDomainGeneratorNaturalIdSpec.groovy | 1 +
.../GrailsDomainGeneratorOptionCoverageSpec.groovy | 3 ++
.../jpa/GrailsDomainGeneratorSpec.groovy | 26 +++++++-----
.../jpa/GrailsDomainGeneratorTenantSpec.groovy | 1 +
.../GrailsDomainGeneratorUniqueGroupSpec.groovy | 1 +
34 files changed, 176 insertions(+), 51 deletions(-)
diff --cc .agents/skills/hibernate-developer/SKILL.md
index 3fb3b9ba91,50352ff247..313c892891
--- a/.agents/skills/hibernate-developer/SKILL.md
+++ b/.agents/skills/hibernate-developer/SKILL.md
@@@ -40,23 -40,46 +40,34 @@@ Native domain binding is the only bindi
## Key Classes and Responsibilities
-### Main Binding Flow
+### Binding Flow
-- `GrailsDomainBinder`: central coordinator for Hibernate 7 mapping contribution.
-- `GrailsPropertyBinder`: main coordinator for converting persistent properties into Hibernate `Value` instances.
-- `PropertyFromValueCreator`: shared utility for creating Hibernate `Property` instances from a bound `Value`.
+- `HibernateMappingContextConfiguration`: builds the session factory; registers `GormMappingContributor` as the first `AdditionalMappingContributor` and `GeneratedDomainClassBinder` as a `SessionFactoryBuilderFactory`.
+- `GormMappingContributor`: hands the entities of a data source to Hibernate; resolves the naming strategy (`NamingStrategyWrapper`) against the JDBC environment.
+- `GeneratedDomainClassBinder`: generates the classes, binds them with Hibernate's annotation binder, installs the GORM identifier generators and the tenant filter, aligns discriminators, unique keys, join columns and collection tables, then switches the class loader service to the real classes.
+- `GrailsDomainGenerator`: decides the facets (`*Facets` records) of every entity and property and emits the annotated class with Byte Buddy. A mapping it cannot describe is refused by name with an `UnsupportedOperationException` that says what to change.
-### Native Domain Binding (`domainbinding.jpa`)
++### Native Domain Binding (`domainbinding.jpa`): where to start
+
-With `hibernate.generatedDomainClasses` on, Hibernate's annotation binder binds classes generated from the GORM mapping instead of `GrailsDomainBinder` building the boot model by hand. Read the package in the order the binding runs:
++Read the package in the order the binding runs:
+
-- `HibernateConnectionSourceSettings.generatedDomainClasses` → `HibernateMappingContextConfiguration` creates a `GeneratedDomainClassBinder` and gives it to `GrailsDomainBinder`, which hands the entities to it.
-- `GeneratedDomainClassBinder.contribute`: the entry point; has `GrailsDomainGenerator.generateAll` generate an annotated class per entity and gives them to Hibernate. `getSessionFactoryBuilder` runs once the metadata is complete and points the bound entities at the real classes.
++- `HibernateMappingContextConfiguration` creates a `GeneratedDomainClassBinder` and the `GormMappingContributor` that hands the entities to it.
++- `GeneratedDomainClassBinder.contribute`: the entry point; has `GrailsDomainGenerator.generateAll` generate an annotated class per entity and gives them to Hibernate's annotation binder. `getSessionFactoryBuilder` runs once the metadata is complete and points the bound entities at the real classes.
+ - `GrailsDomainGenerator`: every mapping decision. Reads a `GrailsHibernatePersistentEntity` into the records of `domainbinding.jpa.facets` (what to state) and writes them as annotations with ByteBuddy. `supports` / `unsupportedReason` name what it refuses before Hibernate boots.
+ - `GeneratedDomainClassLoader` resolves domain class names to the generated classes while Hibernate binds; `GeneratedDomainClassLoaderService` switches those names to the real classes afterwards.
+ - `GrailsIdGenerator`: marker carrying the GORM id generator the binder installs on a generated identifier.
-- Tests: `grails.gorm.tests.generated.*` (both bindings), the two differential specs in the `jpa` test package against the classic oracle in `src/test/resources/classic-oracle` (frozen; refreeze with `-Pgrails.test.refreezeClassicOracle=true`).
++- Tests: `grails.gorm.tests.generated.*`, then the two differential specs in the `jpa` test package against the recorded classic oracle in `src/test/resources/classic-oracle` (see the README for recording).
+
-### Identifier and Version Binding
+### Metamodel
-- `IdentityBinder`: coordinates identifier binding.
-- `SimpleIdBinder`: handles simple identifiers.
-- `CompositeIdBinder`: handles composite identifiers.
-- `VersionBinder`: binds optimistic locking version properties.
-- `NaturalIdentifierBinder`: binds `naturalId` properties.
+- `GrailsHibernatePersistentEntity`, `HibernatePersistentProperty` and the `Hibernate*Property` types: the GORM mapping model with the Hibernate-specific reads the generator needs (column names, join tables, cascade, lazy, the tenant id).
+- `HibernateMappingBuilder`, `Mapping`, `PropertyConfig`, `ColumnConfig`: the mapping DSL and its model.
-### Associations and Collections
+### Column and Naming Helpers
-- `OneToOneBinder`, `ManyToOneBinder`, `ManyToOneValuesBinder`: association binding.
-- `CollectionBinder`: collection mapping.
-- `CollectionSecondPassBinder`, `ListSecondPassBinder`, `MapSecondPassBinder`: second-pass association and collection binding.
-- `CollectionHolder` plus the collection type classes: carry collection metadata through binding.
-
-### Value and Column Binding
-
-- `SimpleValueBinder`: binds simple properties.
-- `SimpleValueColumnBinder`: binds columns to simple values.
-- `ComponentBinder`, `ComponentPropertyBinder`: embedded/component binding.
-- `CompositeUserTypeBinder`: binds a property mapped with a Hibernate `CompositeUserType` as a `Component` (one column per attribute of the user type's `embeddable()` class, in alphabetical attribute order); a `BasicValue` cannot carry a composite user type.
-- `GrailsDomainGenerator.compositeUserTypeFacets` / `defineCompositeUserTypeField`: the native binding's counterpart of `CompositeUserTypeBinder`. A property mapped with a `CompositeUserType` becomes an `@Embedded` field of the value class with `@CompositeType` and one `@AttributeOverride` per attribute of the user type's `embeddable()` class, in the same alphabetical order and with the same column rule, so the two bindings create the same schema.
-- `EnumTypeBinder`: enum mapping.
+- `ColumnConfigToColumnBinder`, `StringColumnConstraintsBinder`, `NumericColumnConstraintsBinder`, `IndexBinder` (`domainbinding.column`): apply a column config to a Hibernate `Column`; the generator and the aligner share them.
+- `DefaultColumnNameFetcher`, `ColumnNameForPropertyAndPathFetcher`, `TableForManyCalculator`, `NamingStrategyWrapper`, `BackticksRemover`, `CascadeBehaviorFetcher`, `CreateKeyForProps`, `UniqueNameGenerator` (`domainbinding.util`).
+- `GrailsDomainGenerator.compositeUserTypeFacets` / `defineCompositeUserTypeField`: a property mapped with a Hibernate `CompositeUserType` becomes an `@Embedded` field of the value class with `@CompositeType` and one `@AttributeOverride` per attribute of the user type's `embeddable()` class (record components, else fields and readable properties, alphabetical; configured columns by position, else `<property>_<attribute>`), the schema Grails 8's classic binder created for it.
### Generators
diff --cc grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GeneratedDomainClassBinder.groovy
index ff6a19e672,4eee9815b5..a03a0f4bfb
--- a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GeneratedDomainClassBinder.groovy
+++ b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GeneratedDomainClassBinder.groovy
@@@ -68,11 -68,14 +68,12 @@@ import org.grails.datastore.mapping.mod
import org.grails.datastore.mapping.model.types.Embedded
import org.grails.orm.hibernate.cfg.HibernateSimpleIdentity
import org.grails.orm.hibernate.cfg.PersistentEntityNamingStrategy
-import org.grails.orm.hibernate.cfg.domainbinding.binder.ColumnConfigToColumnBinder
-import org.grails.orm.hibernate.cfg.domainbinding.binder.ManyToManyOwnerValidator
-import org.grails.orm.hibernate.cfg.domainbinding.binder.NumericColumnConstraintsBinder
-import org.grails.orm.hibernate.cfg.domainbinding.binder.PropertyBinder
-import org.grails.orm.hibernate.cfg.domainbinding.binder.StringColumnConstraintsBinder
+import org.grails.orm.hibernate.cfg.domainbinding.column.ColumnConfigToColumnBinder
+import org.grails.orm.hibernate.cfg.domainbinding.column.NumericColumnConstraintsBinder
+import org.grails.orm.hibernate.cfg.domainbinding.column.StringColumnConstraintsBinder
import org.grails.orm.hibernate.cfg.domainbinding.generator.GrailsSequenceGeneratorEnum
import org.grails.orm.hibernate.cfg.domainbinding.hibernate.GrailsHibernatePersistentEntity
+ import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernateBasicProperty
import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernateEmbeddedProperty
import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernatePersistentEntity
import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernatePersistentProperty
diff --cc grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/package-info.java
index 0000000000,4fdaf77363..7c6d800266
mode 000000,100644..100644
--- a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/package-info.java
+++ b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/package-info.java
@@@ -1,0 -1,49 +1,47 @@@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ /**
+ * Native domain binding: Hibernate's own annotation binder binds the GORM domain classes, from classes generated out of
- * the GORM mapping, instead of {@code GrailsDomainBinder} building Hibernate's boot model by hand. The application's
- * real domain classes stay what Hibernate persists, loads and proxies.
++ * the GORM mapping. The application's real domain classes stay what Hibernate persists, loads and proxies.
+ *
+ * <p>Where to start, in the order the binding runs:</p>
+ * <ol>
- * <li>{@code hibernate.generatedDomainClasses} ({@code HibernateConnectionSourceSettings}) switches it on.
- * {@code HibernateMappingContextConfiguration} then creates a {@link GeneratedDomainClassBinder} and gives it to
- * {@code GrailsDomainBinder}, which hands the entities to it instead of binding them itself.</li>
++ * <li>{@code HibernateMappingContextConfiguration} creates a {@link GeneratedDomainClassBinder} and the
++ * {@link GormMappingContributor} that hands the entities to it.</li>
+ * <li>{@link GeneratedDomainClassBinder#contribute} is the entry point of the binding: it has
+ * {@link GrailsDomainGenerator#generateAll} generate an annotated class for every entity and hands those classes to
+ * Hibernate's annotation binder.</li>
+ * <li>{@link GrailsDomainGenerator} holds every mapping decision: it reads a {@code GrailsHibernatePersistentEntity}
+ * into the records of {@link org.grails.orm.hibernate.cfg.domainbinding.jpa.facets}, which say what to state, and
+ * writes them as JPA and Hibernate annotations with ByteBuddy. {@code supports} and {@code unsupportedReason} say
+ * what it refuses, and why, before Hibernate boots.</li>
+ * <li>{@link GeneratedDomainClassLoader} resolves a domain class name to the generated class while Hibernate binds the
+ * mappings. {@link GeneratedDomainClassLoaderService} switches the same names to the real classes once the metadata is
+ * complete, from {@link GeneratedDomainClassBinder#getSessionFactoryBuilder}, which also points the bound entities at
+ * the real classes, their accessors and GORM's identifier generators.</li>
+ * <li>{@link GrailsIdGenerator} marks a generated identifier with the GORM generator the binder installs on it.</li>
+ * </ol>
+ *
- * <p>The tests under {@code grails.gorm.tests.generated} run the behaviour through both bindings. The two differential
- * specs of the test package of this package compare what the generator states with what the classic binder bound,
- * recorded under {@code src/test/resources/classic-oracle}.</p>
++ * <p>The tests under {@code grails.gorm.tests.generated} cover the behaviour. The two differential specs of the test
++ * package of this package compare what the generator states with what the classic binder of Grails 8 bound, recorded
++ * under {@code src/test/resources/classic-oracle}.</p>
+ *
+ * @since 9.0
+ */
+ package org.grails.orm.hibernate.cfg.domainbinding.jpa;
diff --cc grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GrailsDomainGeneratorSpec.groovy
index 521c95397f,cebf627160..34c594be45
--- a/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GrailsDomainGeneratorSpec.groovy
+++ b/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GrailsDomainGeneratorSpec.groovy
@@@ -130,27 -131,29 +131,30 @@@ import org.grails.orm.hibernate.cfg.Hib
import org.grails.orm.hibernate.cfg.HibernateSimpleIdentity
import org.grails.orm.hibernate.cfg.IdentityEnumType
import org.grails.orm.hibernate.cfg.PropertyConfig
- import org.grails.orm.hibernate.cfg.HibernateMappingContext
- import org.grails.orm.hibernate.connections.HibernateConnectionSourceSettings
- import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernateBasicProperty
- import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernateCustomProperty
- import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernateToManyEntityProperty
- import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernateEmbeddedProperty
- import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernateManyToOneProperty
- import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernateOneToOneProperty
- import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernatePersistentProperty
- import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernateToOneProperty
-import org.grails.orm.hibernate.cfg.domainbinding.binder.ColumnConfigToColumnBinder
-import org.grails.orm.hibernate.cfg.domainbinding.binder.NumericColumnConstraintsBinder
-import org.grails.orm.hibernate.cfg.domainbinding.binder.StringColumnConstraintsBinder
import org.grails.orm.hibernate.cfg.domainbinding.generator.GrailsIdentityGenerator
import org.grails.orm.hibernate.cfg.domainbinding.generator.GrailsIncrementGenerator
import org.grails.orm.hibernate.cfg.domainbinding.generator.GrailsNativeGenerator
import org.grails.orm.hibernate.cfg.domainbinding.generator.GrailsSequenceStyleGenerator
import org.grails.orm.hibernate.cfg.domainbinding.generator.GrailsSequenceWrapper
import org.grails.orm.hibernate.cfg.domainbinding.generator.GrailsTableGenerator
+import org.grails.orm.hibernate.cfg.domainbinding.util.GeneratorCreationContextWrapper
+import org.grails.orm.hibernate.cfg.domainbinding.column.ColumnConfigToColumnBinder
+import org.grails.orm.hibernate.cfg.domainbinding.column.NumericColumnConstraintsBinder
+import org.grails.orm.hibernate.cfg.domainbinding.column.StringColumnConstraintsBinder
import org.grails.orm.hibernate.cfg.domainbinding.hibernate.GrailsHibernatePersistentEntity
+ import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernateBasicProperty
+ import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernateCustomProperty
+ import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernateEmbeddedProperty
+ import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernateManyToOneProperty
+ import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernateOneToOneProperty
+ import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernatePersistentProperty
+ import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernateToManyEntityProperty
+ import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernateToOneProperty
+ import org.grails.orm.hibernate.cfg.domainbinding.jpa.facets.CollectionFacets
+ import org.grails.orm.hibernate.cfg.domainbinding.jpa.facets.HierarchyFacets
+ import org.grails.orm.hibernate.cfg.domainbinding.jpa.facets.IdFacets
+ import org.grails.orm.hibernate.cfg.domainbinding.jpa.facets.ToOneFacets
+ import org.grails.orm.hibernate.cfg.domainbinding.jpa.facets.TypeFacets
import org.grails.orm.hibernate.cfg.domainbinding.util.BackticksRemover
import org.grails.orm.hibernate.cfg.domainbinding.util.ColumnNameForPropertyAndPathFetcher
import org.grails.orm.hibernate.cfg.domainbinding.util.DefaultColumnNameFetcher
diff --cc grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GrailsDomainGeneratorTenantSpec.groovy
index caf0ac1aa9,9d0528bcd1..3b4c8aa4e4
--- a/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GrailsDomainGeneratorTenantSpec.groovy
+++ b/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GrailsDomainGeneratorTenantSpec.groovy
@@@ -36,10 -36,11 +36,11 @@@ import org.hibernate.mapping.Persistent
import org.grails.datastore.mapping.multitenancy.MultiTenancySettings
import org.grails.datastore.mapping.multitenancy.resolvers.SystemPropertyTenantResolver
-import org.grails.orm.hibernate.cfg.domainbinding.binder.ColumnConfigToColumnBinder
-import org.grails.orm.hibernate.cfg.domainbinding.binder.NumericColumnConstraintsBinder
-import org.grails.orm.hibernate.cfg.domainbinding.binder.StringColumnConstraintsBinder
+import org.grails.orm.hibernate.cfg.domainbinding.column.ColumnConfigToColumnBinder
+import org.grails.orm.hibernate.cfg.domainbinding.column.NumericColumnConstraintsBinder
+import org.grails.orm.hibernate.cfg.domainbinding.column.StringColumnConstraintsBinder
import org.grails.orm.hibernate.cfg.domainbinding.hibernate.GrailsHibernatePersistentEntity
+ import org.grails.orm.hibernate.cfg.domainbinding.jpa.facets.TenantFacets
import org.grails.orm.hibernate.cfg.domainbinding.util.BackticksRemover
import org.grails.orm.hibernate.cfg.domainbinding.util.ColumnNameForPropertyAndPathFetcher
import org.grails.orm.hibernate.cfg.domainbinding.util.DefaultColumnNameFetcher
diff --cc grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GrailsDomainGeneratorUniqueGroupSpec.groovy
index 888f43485f,28fb55a6a7..74e880c56f
--- a/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GrailsDomainGeneratorUniqueGroupSpec.groovy
+++ b/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GrailsDomainGeneratorUniqueGroupSpec.groovy
@@@ -27,6 -27,6 +27,7 @@@ import org.hibernate.mapping.Persistent
import org.grails.orm.hibernate.cfg.domainbinding.hibernate.GrailsHibernatePersistentEntity
import org.grails.orm.hibernate.cfg.domainbinding.hibernate.HibernateBasicProperty
++import org.grails.orm.hibernate.cfg.domainbinding.jpa.facets.ConstraintFacets
/**
* Describes how {@link GrailsDomainGenerator} states the unique constraints a mapping asks for with {@code unique: 'group'}