At the database I've a column that is from type Integer that can only contain the following values Active = 1, Temporary=7, Deleted=10. Can these values be mapped from the server to a enum and the database is storing it within a integer column?
According to the documentation I can only use enums when the values are also stored as enums in the database.
At the database I've a column that is from type Integer that can only contain the following values Active = 1, Temporary=7, Deleted=10. Can these values be mapped from the server to a enum and the database is storing it within a integer column?
According to the documentation I can only use enums when the values are also stored as enums in the database.
Share Improve this question asked May 9, 2021 at 18:49 ProVProV 2611 gold badge4 silver badges15 bronze badges2 Answers
Reset to default 3Have you tried to look at @map? Using your question as input, the enum would look like this.
enum YOU_ENUM {
Active @map(1)
Temporary @map(7)
}
I think it is impossible at the time of writing.