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 depth?
PostPosted: Mon Apr 14, 2008 8:24 pm 
Newbie

Joined: Mon Apr 14, 2008 8:19 pm
Posts: 2
Say I have a class hierarchy such that Foo is primary superclass, having two subclasses Bar and Baz, and subclass Bar has two further subclasses of its own, Qux and Qax.

Can I reflect this in a Hibernate XML mapping file using the table-per-hierarchy? Can a subclass contain further subclasses? The examples I've seen all stop with a single layer of inheritance.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 14, 2008 8:30 pm 
Newbie

Joined: Mon Apr 14, 2008 8:19 pm
Posts: 2
From Persistence with Hibernate:

Quote:
The <subclass> element can in turn contain other nested <subclass> elements, until the whole hierarchy is mapped to the table.


So that answers that.


Top
 Profile  
 
 Post subject: Multi level inheritance table per class hieararchy
PostPosted: Fri Sep 26, 2008 2:13 am 
Beginner
Beginner

Joined: Wed Dec 06, 2006 6:24 am
Posts: 24
Location: Bangalore
Hi,

we have nested <subclass> but we don't have option to specify discriminator column in the subclass to further subclass it.

can some one please tell me how to implement multilevel inheritance by using nested <subclass>.

Thanks in advance.

_________________
Vinay N


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.