-->
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: Difficult mappings using annotations
PostPosted: Mon Jul 20, 2009 2:59 pm 
Newbie

Joined: Tue Jul 14, 2009 2:16 pm
Posts: 6
So, I have three entities in my schema, Person, Patient, and Doctor. Patient and Doctor both subclass Person, which is abstract. Also, Doctors have a one-to-many relationship with patients. I was just wondering what the best recommended mapping strategy would be for this situation. I'm looking for performance here, and will be performing many multi-join queries on this data (with the queries reaching out to other tables I'm not talking about here).

Initially I thought I should use table-per-concrete class, but I've read here: http://docs.jboss.org/hibernate/stable/ ... le/#d0e849 that this strategy has lots of drawbacks. Also, I am sort of confused as to what the deal is with joined subclasses and if that is a strategy in itself and how that works, or if I need to declare the join points anyway, etc... Is it different from table-per-concrete subclass? Also, how is table-per-concrete class different than table-per-subclass?

In addition to all this, I need to do it using annotations, so if there are any stumbling blocks I should be aware of, it would be awesome if you let me know.

Thanks for your help


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.