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

   Hibernate 5 counterpart of #16524.
   
   ## Problem
   The enum binding never applied the column `comment`, `defaultValue`, `read` 
and `write` from a mapping, although every other column gets them. The schema 
lacked the default (and comment) of an enum column, and its `read`/`write` 
expressions were not used.
   
   ## Fix
   When an enum property has a column config, its `comment`, `defaultValue`, 
`read` and `write` are applied to the column, as for other columns.
   
   ## Compatibility
   `comment` and `defaultValue` only change the generated DDL. `read` and 
`write` change the SQL for enum columns that configure them: an expression that 
was silently ignored is now used, so an expression that does not produce a 
valid enum name would now fail when loading.
   
   ## Tests
   New `EnumColumnExtrasSpec`: the bound column (with a `String` column as 
control), the schema default, and a store/load round trip through 
`read`/`write`. The three enum features fail without the fix. 
`grails-data-hibernate5-core`: 624 tests, 0 failures. With H2, Hibernate 5 does 
not emit column comments in the DDL for any column, so the comment is checked 
on the bound column only.
   


-- 
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