Aug 7th, 2010, 03:44 PM
data modeling for enum - possible bug
I'm having a problem with enums. Hopefully it's user error, but basically, when changing the type of enumerated value from INT to STRING:
@Enumerated vs @Enumerated(type='STRING'), the database definition is not update.
I'm using MySQL and DataNucleus, and this resulted in a weird situation in the DB. I recreated the entity with the proper enumeration type, then the DB couldn't create the database complaining that it already exists.
I dropped the DB, recreated it, etc. -- no luck. I had to change the name of the schema in order to move forward. It was really strange because the whole time, the table never showed up in the DB...