Mahendr Shinde wrote:I think you made Employee first and then added those two tables later. This is wrong approach!
this might be wrong approach for Hibernate inheritance mapping.
But, the scenario is:
I have an EMPLOYEE table with multiple columns. I execute many queries on EMPLOYEE table.
Now, there is an enhancement that is specific for few employees. These few Employees are categorised as REGULAR_EMP and CONTRACT_EMP. Please note that there can be Employees who are neither Regular nor Contract Emp.
Now, I don't want to do changes in existing EMPLOYEE table just for few Employees.
It seems I should go with one-to-one relationship instead of inheritance. am I right?