This is an automated email from the ASF dual-hosted git repository.
borinquenkid pushed a change to branch 8.0.x-hibernate7
in repository https://gitbox.apache.org/repos/asf/grails-core.git
from 15f67da500 Simplify GORM Hibernate 7 binder code by using specific
persistent types.
new c6a4235cb7 Refactor domain binding utilities and binders for Hibernate
7 compatibility
new 9e3e2062f5 systematically refactored the domainbinding package to use
Hibernate-specific property types (HibernateManyToManyProperty,
HibernateOneToManyProperty, etc.) for internal logic and instanceof checks,
which improves clarity and type safety while maintaining GORM's core
abstractions
new acf6623527 summary of the changes: 1. `ComponentBinder.java`:
Updated the bindComponent method signature to accept HibernateEmbeddedProperty
instead of Embedded. Removed the redundant cast. 2.
`ComponentPropertyBinder.java`: Updated the bindComponentProperty method to use
HibernateEmbeddedProperty in pattern matching. Updated the bindComponent method
signature to use HibernateEmbeddedProperty. Added the necessary import.
3. `GrailsPropertyBinder.java`: Updated the [...]
new bef44f9570 replacing all appropriate calls from
GrailsHibernatePersistentEntity to getPersistentProperties() with
getHibernatePersistentProperties() across the grails-data-hibernate7 module
new 386ec93b85 refactored PropertyBinder.bindProperty, updated its
callers, and ensured all tests in grails-data-hibernate7-core pass. The
refactoring includes: * Updating
PropertyBinder.bindProperty(GrailsHibernatePersistentProperty, Value) to return
a Property. * Updating PropertyFromValueCreator.createProperty,
SimpleIdBinder.bindSimpleId, and VersionBinder.bindVersion to use the new
return value.
new 2c058cbe06 refactor unused function and move updatable
new 7189bc604b 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
new a33e502810 refactored BasicValueIdCreator by changing its public
constructor to take Table instead of RootClass as the final argument and
updated the imports accordingly. I also updated SimpleIdBinder to pass
entity.getTable() to the constructor.
new e7b30f9386 refactored BasicValueIdCreator by removing
GrailsHibernatePersistentEntity from its constructor and instead passing it as
an argument to getBasicValueId, which then forwards it to createGenerator. I
also updated the BasicValueIdCreator constructor to take Table as its final
argument
new 949d018954 updated SimpleIdBinder.bindSimpleId to include Table as the
last argument, which is now used to initialize BasicValueIdCreator. I also
updated IdentityBinder and the relevant test specifications
(SimpleIdBinderSpec and IdentityBinderSpec) to pass the table argument
new d2ffc9077c Refactored IdentityBinder to accept SimpleIdBinder as a
dependency and updated GrailsDomainBinder accordingly.
new d33fb6b274 Refactor BasicValueIdCreator and SimpleIdBinder for
improved statelessness and testability.
new de2fd8c248 Refactor BasicValueIdCreator to internally instantiate
BasicValue.
new d3ed832bd0 Inject BasicValueIdCreator into SimpleIdBinder.
new 932f38c388 Refactor ColumnNameForPropertyAndPathFetcher to use 3-arg
constructor.
new d881e24d8d Eliminate varargs from SimpleValueBinder.bindSimpleValue.
new 2d842d8a5e Refactor type resolution from SimpleValueBinder to
GrailsHibernatePersistentProperty.
new a5b37f1c7e Refactor binders to support custom ID generator creation in
SimpleValueBinder
The 18 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:
.gitignore | 1 +
.../core/HIBERNATE7-UPGRADE-PROGRESS.md | 15 ++++
.../orm/hibernate/cfg/GrailsDomainBinder.java | 86 ++++++++++++++++++++--
.../cfg/GrailsHibernatePersistentEntity.java | 17 +++--
.../cfg/GrailsHibernatePersistentProperty.java | 47 +++++++++++-
.../orm/hibernate/cfg/HibernateMappingContext.java | 2 +-
.../cfg/PersistentEntityNamingStrategy.java | 3 +-
.../grails/orm/hibernate/cfg/PropertyConfig.groovy | 2 +-
.../cfg/domainbinding/binder/CollectionBinder.java | 41 +++++++++--
.../cfg/domainbinding/binder/ColumnBinder.java | 14 ++--
.../cfg/domainbinding/binder/ComponentBinder.java | 16 ++--
.../binder/ComponentPropertyBinder.java | 69 +++++++++++------
.../CompositeIdentifierToManyToOneBinder.java | 36 ++++-----
.../domainbinding/binder/GrailsPropertyBinder.java | 48 ++++++------
.../cfg/domainbinding/binder/IdentityBinder.java | 15 +---
.../cfg/domainbinding/binder/ManyToOneBinder.java | 36 ++++-----
.../binder/NaturalIdentifierBinder.java | 2 +-
.../cfg/domainbinding/binder/OneToOneBinder.java | 11 ++-
.../cfg/domainbinding/binder/PropertyBinder.java | 14 +++-
.../cfg/domainbinding/binder/SimpleIdBinder.java | 37 +++++-----
.../domainbinding/binder/SimpleValueBinder.java | 79 +++++++-------------
.../cfg/domainbinding/binder/VersionBinder.java | 21 +++---
.../hibernate/HibernateBasicProperty.java | 4 +-
.../hibernate/HibernateToManyProperty.java | 6 +-
.../secondpass/CollectionSecondPassBinder.java | 72 ++++++++++++------
.../secondpass/ListSecondPassBinder.java | 4 +-
.../secondpass/MapSecondPassBinder.java | 4 +-
.../domainbinding/util/BasicValueIdCreator.java | 19 ++---
.../domainbinding/util/CascadeBehaviorFetcher.java | 25 ++++---
.../util/ColumnNameForPropertyAndPathFetcher.java | 7 --
.../cfg/domainbinding/util/CreateKeyForProps.java | 10 +--
.../util/DefaultColumnNameFetcher.java | 14 ++--
.../cfg/domainbinding/util/LogCascadeMapping.java | 16 ++--
.../domainbinding/util/NamingStrategyWrapper.java | 20 ++++-
.../util/PropertyFromValueCreator.java | 5 +-
.../domainbinding/util/TableForManyCalculator.java | 9 +--
.../cfg/GrailsHibernatePersistentEntitySpec.groovy | 45 +++++------
.../GrailsHibernatePersistentPropertySpec.groovy | 45 +++++++++++
.../domainbinding/BasicValueIdCreatorSpec.groovy | 28 ++++---
.../CollectionSecondPassBinderSpec.groovy | 13 +++-
.../cfg/domainbinding/ComponentBinderSpec.groovy | 13 ++--
.../ComponentPropertyBinderSpec.groovy | 58 ++++++++-------
...CompositeIdentifierToManyToOneBinderSpec.groovy | 6 +-
.../cfg/domainbinding/IdentityBinderSpec.groovy | 8 +-
.../domainbinding/ListSecondPassBinderSpec.groovy | 12 ++-
.../cfg/domainbinding/LogCascadeMappingSpec.groovy | 14 ++--
.../cfg/domainbinding/ManyToOneBinderSpec.groovy | 24 +++---
.../domainbinding/MapSecondPassBinderSpec.groovy | 13 +++-
.../cfg/domainbinding/PropertyBinderSpec.groovy | 12 ++-
.../PropertyFromValueCreatorSpec.groovy | 12 ++-
.../cfg/domainbinding/SimpleIdBinderSpec.groovy | 30 +++++---
.../cfg/domainbinding/SimpleValueBinderSpec.groovy | 18 ++++-
.../cfg/domainbinding/VersionBinderSpec.groovy | 41 ++++++++---
.../liquibase/GormColumnSnapshotGenerator.groovy | 2 +-
54 files changed, 777 insertions(+), 444 deletions(-)