-->
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.  [ 4 posts ] 
Author Message
 Post subject: table per class hierarchy
PostPosted: Thu Jul 07, 2005 3:55 pm 
Newbie

Joined: Thu Jul 07, 2005 3:30 pm
Posts: 2
Location: Floripa / Brazil
I'm new with Hibernate and i'd like to see some table-per-class-hierarchy mapping example with subclass of subclass.
Thanks in advance.

Hibernate version:hibernate-3.0.2

_________________
Mau
Florianopolis - Brazil


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 08, 2005 1:33 pm 
Beginner
Beginner

Joined: Fri Jul 08, 2005 12:38 pm
Posts: 41
Location: Massachusetts, USA
http://www.hibernate.org/hib_docs/v3/reference/en/html/inheritance.html#inheritance-tableperclass


Top
 Profile  
 
 Post subject: still don't know
PostPosted: Fri Jul 08, 2005 1:49 pm 
Newbie

Joined: Thu Jul 07, 2005 3:30 pm
Posts: 2
Location: Floripa / Brazil
Thanks for the tip Jweiskotten but, the example in the reference just shows some Classes (CreditCardPayment, CashPayment, ChequePayment) and its Superclass (Payment). What I need to know is how would be the mapping if CreditCardPayment had a subclass Visa or American Express, for example. In other words, a third level of hierarchy.

Any help would be great.

_________________
Mau
Florianopolis - Brazil


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 08, 2005 2:06 pm 
Beginner
Beginner

Joined: Fri Jul 08, 2005 12:38 pm
Posts: 41
Location: Massachusetts, USA
In the mapping for your first subclass (CreditCardPayment), add a subclass element for each subclass (Visa, AmericanExpress) and assign the appropriate discriminators.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.