It's about the annotations in mybatisplus (for more details, pls refer to the source code) However, retrieving the object and getting its enum value filled from the integer stored in the database has not been as easier as inserting it. I tried, without luck, using a.
You can store the values as text, then use an insert trigger to validate that the stored values. Learn how to effectively use enums in mybatis with detailed examples, solutions, and best. Make sure the string values stored in the database correspond to the enum constants.
I'd try labeling your field with @enumerated (enumtype.string) annotation like: