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