Joined: Thu Oct 13, 2011 6:46 am Posts: 1
|
Hello, We are trying to create the objects to model an existing database model using POJOs and hibernate mapping xml files. Most of the tables in the database share some columns (for eg status) so we want to have those properties in a base class have all the other classes extend it. Is there anyway to represent this using a hibernate mapping file? I guess what we are looking for is an equivalence to the @mappedsuperclass in JPA. I have tried creating an abstract class and then using a union-subclass for the tables but the problem with this is you have to declare the primary key in the abstract class and the extending subclasses can override or add to it. Any ideas ?
|
|