The GitHub Actions job "End to End" on grails-core.git/fix/hibernate7-unique-group-enum-and-collection-8.0.x has failed. Run started by GitHub user borinquenkid (triggered by borinquenkid).
Head commit for run: b8db16ea0fd9133b240510f85f196fda9a2d7dd6 / Walter Duque de Estrada <[email protected]> fix: unique groups on enum and collection properties A unique group (unique: 'other' or unique: ['a', 'b']) creates a unique key over the property's column and the columns of the listed properties. Two shapes were broken: - An enum property made no key at all: EnumTypeBinder never ran the unique key creation that ColumnBinder.bindColumn performs through CreateKeyForProps, so duplicates of the group were accepted by the database. EnumTypeBinder now calls CreateKeyForProps for the enum column, exactly as ColumnBinder does. - A collection property made a key over a column its table lacks: the collection key is bound through ColumnBinder with the collection property, so the group became a unique key of the collection table that named the owner's column (x on ug_collection_group_tags). The collection table then failed to create and the first insert failed with "Table not found". The same path serves a basic collection of enums, via EnumTypeBinder. CreateKeyForProps now creates no key for a to-many property: the group's other columns are not in its table, so there is nothing meaningful to make. Hibernate 5 reaches the same code (bindColumn -> handleUniqueConstraint on the collection key) and, for enums, never creates the key either, so it has both defects; ignoring the group on a collection is the only consistent reading. Plain unique: true on an enum already worked and is covered as a regression row. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Report URL: https://github.com/apache/grails-core/actions/runs/37366186130 With regards, GitHub Actions via GitBox
