|
I've before created a question on StackOverflow (with code examples): http://stackoverflow.com/questions/18937049/embeddable-wont-set-length-of-columns
The problem is simply, when using "@Column(name="MyColumn", length=16)" inside an "@Embeddable" class. Then the column name gets set correctly, but the length gets ignored (set to 255). In addition hibernate tells MySQL to set some default value for the column (in my case: "\0\0\0\0...\0\0\0\0").
It doesn't matter if I use (as in the StackOverflow code) an @Embeddable inside a @MappedSuperclass. Or if I create a completely separate class for the @Embeddable.
|