That's not supported, and supporting would be complex. The SQL parser, which validates the SQL input before the code generator generates Kotlin code, does not look into Kotlin sources, so it does not know if EnumClass a) is a valid Kotlin enum and b) does not know the possible entries. Extreme case: EnumClass could be defined in a dependency.