-->
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.  [ 3 posts ] 
Author Message
 Post subject: Mixing table per concrete class and table per hierarchy
PostPosted: Wed Feb 17, 2010 4:05 pm 
Newbie

Joined: Wed Feb 17, 2010 2:58 pm
Posts: 2
Hi, I need to mix table per concrete class and table per hierarchy mappings at the same hierarchy but on different branches. The conflict situation is:
Code:
   
     A
    /  \
   B    C
  /\    /\
D E   F  G


A,B and C are abstract class. I need to mapp C hierarchy as table per hierarchy and B hierarchy as table per concrete class.

Any idea?

Thanks yerman


Top
 Profile  
 
 Post subject: Re: Mixing table per concrete class and table per hierarchy
PostPosted: Thu Feb 18, 2010 5:41 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Hibernate supports certain mixing of inheritance-strategies,
so as first step I would try to:
-define table per hierarchy strategy on A (so this strategy is also applied on C)
-define table per concrete class strategy on B

If that not work, then you could consider to:
-define class A as mapped superclass (@MappedSuperclass)
-define table per concrete class strategy on B
-define table per hierarchy strategy on C
This should work in either case


Top
 Profile  
 
 Post subject: Re: Mixing table per concrete class and table per hierarchy
PostPosted: Fri Feb 19, 2010 12:28 pm 
Newbie

Joined: Wed Feb 17, 2010 2:58 pm
Posts: 2
Thanks a lot for your reply, I´ll consider your proposal and I´ll make a test..
Later tell you

thanks


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

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.