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.  [ 1 post ] 
Author Message
 Post subject: inheritance mapping question
PostPosted: Sat Aug 25, 2007 12:38 pm 
Newbie

Joined: Thu Aug 17, 2006 8:59 am
Posts: 7
Hi, I have following problem:

Let class BasePerson represent base class of classes PersonA and PersonB. All classes needs to be mapped to single table (table-per-hierarchy), without need for discriminator, because don't want to have repeteable data in "person" table with different discriminator value.

Second, BasePerson belong to CORE component, and PersonA belongs to ProjectA and PersonB belongs to ProjectB. Core component can be tested in isolation, all queries are against "person" table through BasePerson (HQL or Criteria queries).

How to organize mappings? Is it possible to put all "basic" mappings in core component (BasePerson, BaseDocument, ...) and in mapping files for PersonA and PersonB to put just their own properties?

Thanks in advance. I hope my question is clear.

Regards.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.