how to implement inheritance in hibernate ??
        Posted  
        
            by user359057
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by user359057
        
        
        
        Published on 2010-06-05T06:35:33Z
        Indexed on 
            2010/06/05
            6:42 UTC
        
        
        Read the original article
        Hit count: 222
        
hibernate
Hi guys i am working in a web application. I have a entities as BaseEntity -->Which contains user login info like createdBy,createdTime,EditedBy,editedTime Employee --> which contains employee information like name,address,etc... RegularEmployee -->which contains salary ,bonus tht kind of fields and ContactEmployee --> which contains HourlyRate,contactPeriod etc....
My inheritance structure is BaseEntity <--- Employee <---- RegularEmployee
(i.e. Employee extends BaseEntity and RegularEmployee extends Employee ContractEmployee also extend Employee Class ).
How to design database structure in this case considering all the tables have id and version fields (all tables should at least have these two fields).
© Stack Overflow or respective owner