Control sort order of Hibernate EnumType.STRING properties
问题 Currently, my project uses @Enumerated(EnumType.ORDINAL) , so when I sort by this column, it is ordering based on the order in the enum , which works fine. But I need to add some additional values to the enum , which need to be inserted at different locations in the list of enum values and can't be just added to the bottom to maintain the correct sort order. If I do this, my database will be messed up. I'll have to write some scripts to translate all these ordinal values to the correct new