Fixed
Details
Assignee
Christian BeikovChristian BeikovReporter
Christian BeikovChristian BeikovFix versions
Priority
Major
Details
Details
Assignee
Christian Beikov
Christian BeikovReporter
Christian Beikov
Christian BeikovFix versions
Priority
Created May 19, 2022 at 1:15 PM
Updated December 20, 2022 at 2:23 PM
Resolved May 30, 2022 at 5:53 PM
Enums currently map to the type code
SqlType.TINYINT
by default, which is a 1 byte type. This mapping is not quite correct as Java effectively allows up to 32K enum entries, so the goal is to switch toSMALLINT
.In practice, this wasn't a big issue though for two reasons. A lot of databases do not support a 1 byte integer DDL type, so Hibernate falls back to the 2+ byte integer type as DDL type. Apart from that, enums in ORM models usually do not exceed the 255 value limit.