-->
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: @Inheritance on @Mappedsuperclass
PostPosted: Tue Mar 16, 2010 12:35 pm 
Newbie

Joined: Tue Mar 16, 2010 12:24 pm
Posts: 1
I have a global superclass for all hibernate mapped entity classes
Code:
@MappedSuperclass
public abstract class BaseEntity {..}
@Entity
@Table(name = "junk", schema = "dbo")
public class Junk extends BaseEntity implements Serializable {..}

I tried to set the default inheritance strategy by adding @Inheritance(strategy=InheritanceType.JOINED) to BaseEntity and this works ***BUT*** I can not then override this on specific entities where I wish to deviate from the default approach, any @Inheritance annotation on the subclass is just ignored.
Is this expected/valid behaviour?
Is there a way I can do this?


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.