You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by "matrei (via GitHub)" <gi...@apache.org> on 2026/10/06 14:16:12 UTC
[PR] Hibernate 5: unique groups on enum and collection properties [grails-core]
matrei opened a new pull request, #16541:
URL: https://github.com/apache/grails-core/pull/16541
Hibernate 5 counterpart of #16533.
## Problem
- Enum: a `unique` group on an enum property created no unique key, so the database accepted duplicates.
- Collection: a `unique` group on a collection property created a key on the collection table over a column of the owner table. The DDL failed at startup with `Column "X" not found` (logged, the table itself is created).
## Fix
The enum binding creates the group key as other columns do (both the `mapping` and `constraints` forms). A collection property gets no group key, since its table does not hold the other columns. Serializable collections are not affected; Hibernate 5 never created group keys for them.
## Compatibility
Enum unique groups now get a database key. With `create`, duplicates are rejected. With `update`, adding the key to a table that already holds duplicates fails and is only logged.
## Tests
New `UniqueGroupEnumAndCollectionSpec`. The enum and collection-key features fail without the fix. `grails-data-hibernate5-core`: 629 tests, 0 failures.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Hibernate 5: unique groups on enum and collection properties [grails-core]
Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty merged PR #16541:
URL: https://github.com/apache/grails-core/pull/16541
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Hibernate 5: unique groups on enum and collection properties [grails-core]
Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on PR #16541:
URL: https://github.com/apache/grails-core/pull/16541#issuecomment-6026823540
This is a backport from an already approved PR, merging it.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Hibernate 5: unique groups on enum and collection properties [grails-core]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #16541:
URL: https://github.com/apache/grails-core/pull/16541#issuecomment-6020034998
## ✅ All tests passed ✅
🏷️ Commit: 83b962bb0e082e5a26f7382a6c5215504ce7e63d
▶️ Tests: 50959 executed
⚪️ Checks: 54/54 completed
---
_Learn more about TestLens at [testlens.app/docs](https://testlens.app/docs/features/pr-comment/)._
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org