-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: @mappedsuperclass in hibernate cfg
PostPosted: Fri Oct 14, 2011 5:31 am 
Newbie

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 ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.