Yeah as mentioned in the article, enums may break pre-existing data in the DB if new values are introduced (if you don't explicitly mention the mapped values). If you plan to use enums, mapping them to a specific value is a non-negotiable, but you can always use constant objects, mapping the same values.
I personally prefer using enums & haven't run into any issues over the past 4 years apart from the unmapped enums being overwritten
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yeah as mentioned in the article,
enums
may break pre-existing data in the DB if new values are introduced (if you don't explicitly mention the mapped values). If you plan to useenums
, mapping them to a specific value is a non-negotiable, but you can always use constant objects, mapping the same values.I personally prefer using
enums
& haven't run into any issues over the past 4 years apart from the unmapped enums being overwritten