-->
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.  [ 2 posts ] 
Author Message
 Post subject: Table per class hierarchy mapping doubts
PostPosted: Mon Feb 07, 2005 8:07 pm 
Newbie

Joined: Mon Feb 07, 2005 7:57 pm
Posts: 9
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:2.1.7


Hi there I have this model in my domain:

People
Candidate extends People
Employee extends People

all those classes are maped to the PEOLPE table, the discriminator-column is CATEGORY. In a test I added a people value and a candidate value in the table. I have a DAO PeopleDAO which contains a findAll method. now, after I created the hierarchy instead of fetching 2 records, it brings 4. 2 people and 2 candidate. I'm using xdoclet my mapping looks like this:


Code:

/**
* @author Vinicius
* @date07/02/2005
* @hibernate.class table = "PEOPLE" discriminator-value = "C"
* @hibernate.discriminator column = "Category" type = "string"
*/


public class Candidate extends People

/**
* @author Vinicius
* @hibernate.class table = "PEOPLE"
*/
public class Peopleextends BasePojo{


I know I'm doing something wrong. what would it be?
Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 07, 2005 8:13 pm 
Newbie

Joined: Mon Feb 07, 2005 7:57 pm
Posts: 9
Sorry. dummy question, no answers needed sorry


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