0

I am working on a Spring Data application.

Master data in my application like Gender, Qualification etc. are needed to be available for multiple entities in the application. I am using liquibase to create the schema and data for the initial dataset in the application.

  1. Should these master tables be mapped as entities in the application?
  2. Is it possible to get the data in these entities as enums in the application?
  3. Or should i get this information at the application start as static data available throughout the application?

There are examples/answers to queries regarding generating enums in code, but my requirement is different.

Beena
  • 1
  • 1

1 Answers1

0
  1. for sure because the master data can change over time and if you have that as Enum or static data you have to recompile the application.
Simon Martinelli
  • 34,053
  • 5
  • 48
  • 82
  • I believe the OP *might* mean that the reason they would like to map the data in form of enums is that they don't anticipate changes over time – crizzis Jan 03 '18 at 17:08
  • yes, the master data can change. Hence i am creating the entities in the application and adding data in a Hashmap instead of Enum. – Beena Jan 04 '18 at 06:09