-->
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: Inheritance
PostPosted: Thu Nov 11, 2004 8:18 pm 
Regular
Regular

Joined: Mon Jun 14, 2004 1:42 pm
Posts: 80
Location: Brazil
Hibernate version:
2.1.6
--
Hi, I was trying to map a 3 level inheritance where the first generalization is mapped as table per hierarchy and the second is mapped as table per class.
something like
<class
..
<subclass
..
<joined-subclass
..
</joined-subclass
</subclass
</class

This isn't possible, right (violates DTD) ? Is it workaroundable (I think that's a new verb)?
Thanks

_________________
Alexandre Torres
--------------------


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 21, 2004 6:27 pm 
Beginner
Beginner

Joined: Fri May 21, 2004 12:21 pm
Posts: 22
Location: Sacramento CA, USA
I tried the following and it worked fine with table per subclass .

<class>
<joined-subclass>
<joined-subclass></joined-subclass>
</joined-subclass>
</class>


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 22, 2004 4:16 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
as per doc (and DTD) you can't mix the two different mappings strategies in H2.

In H3 you can - done via the <join> construct.

_________________
Max
Don't forget to rate


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.