I have a main domain class embedding a second one (let's say House embeds owner of class Person).
Person.groovy is under src/groovy and has an enum property, that I need to use as an ordinal in MySQL.
I defined the mapping block on the Person class:
static mapping =
but it does not seem to work. Hibernate creates the table with the correct definition but later I get exceptions (Caused by: java.lang.IllegalArgumentException: No enum const class com.kameleoon.decoration.CSSUnit.1), which means it does not understand the 1 should be converted to the propert Enum class.
Can someone please help me there? Is it a bug, or is there a workaround?