borinquenkid opened a new pull request, #16052:
URL: https://github.com/apache/grails-core/pull/16052

   ## Summary
   - `HibernateBasicProperty.getTable()` always resolved to the owning entity's 
table instead of the collection's join table, so a `hasMany`-of-enum property's 
element column was bound to the wrong table: it appeared (wrongly) on the owner 
and was missing from the join table's own `CREATE TABLE`, breaking schema 
generation.
   - `HibernateToManyProperty.joinTableColumName()` derived the enum element 
column name from the enum's fully-qualified class name instead of its simple 
name.
   - Introduces `HibernateBasicEnumProperty` so `hasMany`-of-enum elements are 
recognized as `HibernateEnumProperty` like their singular counterparts, 
collapsing `EnumTypeBinder` down to a single `bindEnumType()` entry point and 
letting each `HibernateEnumProperty` implementation supply its own table, 
column name, nullability, and enum-storage configuration instead of the binder 
branching on property shape.
   
   Fixes #16051
   
   ## Test plan
   - [x] Added `EnumHasManyDdlSpec` reproducing the issue: join table gets its 
element column, owner table gets no spurious column, and a `hasMany`-of-enum 
can be saved and reloaded end-to-end.
   - [x] Updated `EnumTypeBinderSpec` and `BasicCollectionElementBinderSpec` 
for the collapsed `EnumTypeBinder` API.
   - [x] Full `:grails-data-hibernate7-core:test` suite green (3009 tests, 0 
failures).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to