I have the following database tables: lookup and employee.
Lookup Table: structure with sample data.
Employee Table: structure with sample data.
I tried to map an abstract class to lookup table and use class_name column as discriminator for the subclasses Sex and Bank and reference the bank and sex as ManyToOne in the employee object.. but I'm getting a class cast exception when the sex_code and bank_code has the same value.
I tried to create views Sex_lookup and Bank_lookup and map them directly to entities. again hibernate complains that he can't find a table with such name.