I’m not sure if the topic name makes sense.
Anyway, the problem is that in my table I have column which stores fk to dictionary table and I want to map it in hibernate in a way that getType will return a value from this dictionary. As an example I have row with type id = 1 which in dictionary corresponds to HIGH, and I have such enum declared in java as ProductType, I want to have method
ProductType getType() which will automatically map values from column type to my enum.
If something’s not clear, please let me know.
Thanks in advance!
This is the answer to my question
Of course my enum looks as follows: