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 8ab5038dfccadd8d9e8a227bd37101fc63571dbf Author: Walter Duque de Estrada <[email protected]> AuthorDate: Tue Oct 6 20:57:29 2026 -0500 test(hibernate7): drop passed @PendingFeature pins and update DDL differential KNOWN list The upstream fixes for insertable/updatable false, enum column extras and the inverse join table name make four pinned features pass, so their @PendingFeature markers go. ENUM_COLUMN_EXTRAS no longer occurs and is removed; INVERSE_JOIN_TABLE_NAME now covers only a mapping naming the table differently on both sides (1 table, was 3). Differences: 60 -> 50, 0 unknown. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> --- .../domainbinding/jpa/GeneratedDomainClassesDdlDifferentialSpec.groovy | 3 +-- .../cfg/domainbinding/jpa/GrailsDomainBinderOptionDefectSpec.groovy | 3 --- .../cfg/domainbinding/jpa/ManyToManyOwnershipDefectSpec.groovy | 2 -- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GeneratedDomainClassesDdlDifferentialSpec.groovy b/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GeneratedDomainClassesDdlDifferentialSpec.groovy index 8b463cab25..680b58cd77 100644 --- a/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GeneratedDomainClassesDdlDifferentialSpec.groovy +++ b/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GeneratedDomainClassesDdlDifferentialSpec.groovy @@ -65,9 +65,8 @@ class GeneratedDomainClassesDdlDifferentialSpec extends Specification { private static final List<Map> KNOWN = [ [id: 'BINDER_DUPLICATE_FOREIGN_KEY', reason: 'A binder defect: a bidirectional association to an entity with a composite identifier gets two foreign keys of the same name over the same columns, one from the to-one side (referenced columns stated) and one from the collection key (referenced columns left to the primary key), listed in two column orders. Hibernate creates one constraint of that name; which of the two it is depends on the order the domain classes are bound in. Th [...] [id: 'COMPOSITE_KEY_TYPE_SWAP', reason: 'A binder defect: for a foreign key to a composite identifier whose part is itself a to-one to a composite identifier, the binder names the foreign key columns after the parts in the mapped order but gives them the types of the sorted referenced key, so a part of another type than its neighbour gets the NAME of the other part (child.parent_grand_parent_name is INTEGER, referencing the integer luckyNumber). The generated mode names them [...] - [id: 'ENUM_COLUMN_EXTRAS', reason: 'A binder defect (pinned in GrailsDomainBinderOptionDefectSpec): EnumTypeBinder ignores the comment and default expressions of an enum column\'s mapping. The generated mode honours them, so a database created by the binder lacks a default and a comment that the mapping states. Matching the binder would drop what the mapping says; decision for the lead (the 8.x line has the same defect).'], [id: 'IGNORE_NOT_FOUND_FOREIGN_KEY', reason: 'ignoreNotFound: true: Hibernate\'s @NotFound(IGNORE) disables the foreign key (SimpleValue.disableForeignKey, there is no enabling counterpart), the binder keeps it, which makes the option contradict itself (a dangling reference cannot exist). Re-creating the key would need Table.createForeignKey with a name computed through the implicit naming strategy\'s internal ForeignKeyNameSource. Hibernate\'s own behaviour is arguably the r [...] - [id: 'INVERSE_JOIN_TABLE_NAME', reason: 'A binder defect (pinned in ManyToManyOwnershipDefectSpec): when only the owning side of a many-to-many names the join table, the inverse side computes the default name and the binder creates a second, unused table for it. The generated mode creates the table the owning side names (Hibernate derives the inverse side from mappedBy), so the unused table is absent. Nothing reads or writes the binder\'s extra table. 3 tables in the scanned [...] + [id: 'INVERSE_JOIN_TABLE_NAME', reason: 'A mapping that names the join table on both sides of a many-to-many with different names (the binder adopts the owning side\'s name only when the inverse side names none, since the 8.0.x fix for the inverse join table): the inverse side keeps its own name and the binder creates a second, unused table for it. The generated mode creates the table the owning side names (Hibernate derives the inverse side from mappedBy), so the unused tabl [...] [id: 'LIST_INDEX_CHECK', reason: 'Hibernate adds check (<index column> >= 0) to the index column of every list (IndexColumn.addIndexCheckConstraint, always, for @OrderColumn) and offers no annotation to avoid it; Column.getCheckConstraints() is unmodifiable and Column has no removal method (Column.copy shares the list), so it cannot be removed through public API, only by reflection on the private list, which is not done. The check can never reject a value GORM writes (indexes [...] [id: 'MAP_ELEMENT_NULLABLE', reason: 'The mapping of a map of values states nullable: false on the element column and the binder leaves the column nullable (it ignores the option, like the enum column extras); the generated mode honours the mapping, so a database created by the binder has a nullable column where the generated mode creates NOT NULL. Matching the binder would drop a constraint the mapping states.'], [id: 'MAP_UNUSED_COLUMN', reason: 'The binder leaves an unused nullable column in the table of a map of values (the element it bound before the map replaced it, attributes_java_lang_string); the generated mode creates no such column. Nothing reads the extra column; an existing database keeps it (update does not drop columns).'], diff --git a/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GrailsDomainBinderOptionDefectSpec.groovy b/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GrailsDomainBinderOptionDefectSpec.groovy index 4d2dcd1cce..73f55d1855 100644 --- a/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GrailsDomainBinderOptionDefectSpec.groovy +++ b/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/GrailsDomainBinderOptionDefectSpec.groovy @@ -50,7 +50,6 @@ class GrailsDomainBinderOptionDefectSpec extends HibernateGormDatastoreSpec { DefectWritable.get(row.id).updated == 'c' } - @PendingFeature(reason = 'PropertyBinder overwrites the insertable flag of the property with the one of its columns, which are always insertable, so insertable: false is ignored') void "insertable false keeps the value out of the insert"() { given: DefectReadOnlyColumns row = new DefectReadOnlyColumns(inserted: 'a', updated: 'b').save(flush: true, failOnError: true) @@ -60,7 +59,6 @@ class GrailsDomainBinderOptionDefectSpec extends HibernateGormDatastoreSpec { DefectReadOnlyColumns.get(row.id).inserted == null } - @PendingFeature(reason = 'PropertyBinder overwrites the updatable flag of the property with the one of its columns, which are always updatable, so updatable: false is ignored') void "updatable false keeps the value out of the update"() { given: DefectReadOnlyColumns row = new DefectReadOnlyColumns(updated: 'b').save(flush: true, failOnError: true) @@ -87,7 +85,6 @@ class GrailsDomainBinderOptionDefectSpec extends HibernateGormDatastoreSpec { thrown(Exception) } - @PendingFeature(reason = 'EnumTypeBinder only applies the length, precision, scale, SQL type and uniqueness of the column config, so a comment, a default and read and write expressions on an enum column are ignored') void "the comment, default and read and write expressions of an enum column reach the column"() { given: Column column = getPersistentEntity(DefectEnumColumn).persistentClass.getProperty('state').columns[0] as Column diff --git a/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/ManyToManyOwnershipDefectSpec.groovy b/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/ManyToManyOwnershipDefectSpec.groovy index c46b3128c1..779b749d76 100644 --- a/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/ManyToManyOwnershipDefectSpec.groovy +++ b/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/cfg/domainbinding/jpa/ManyToManyOwnershipDefectSpec.groovy @@ -20,7 +20,6 @@ package org.grails.orm.hibernate.cfg.domainbinding.jpa import grails.gorm.annotation.Entity import grails.gorm.tests.HibernateGormDatastoreSpec -import spock.lang.PendingFeature /** * Pins a defect of the domain binder in the many-to-many ownership rules, found by comparing it with the annotations @@ -34,7 +33,6 @@ class ManyToManyOwnershipDefectSpec extends HibernateGormDatastoreSpec { manager.registerDomainClasses(DefectNamedOwner, DefectNamedInverse) } - @PendingFeature(reason = 'the inverse side names its join table from its own mapping, not from the owner that names it, so it reads another table') void "the inverse side of a many-to-many sees the rows the owner wrote when only the owner names the join table"() { given: DefectNamedInverse inverse = new DefectNamedInverse(name: 'inverse')
