-->
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: Mapping a Decorator Pattern
PostPosted: Sun Jun 10, 2007 5:06 am 
Newbie

Joined: Thu Dec 21, 2006 1:41 pm
Posts: 4
Hi!
Hope you can help my with you issue...
I made a domain model (http://cedev.com.ar/model.jpg) and what I'm trying to is the NHibernate mappings to persist it. (It's uses the Decorator Pattern, of course..)
It's importante to know that a Person might be a Student and a Tutor at the same time (that's why it's not a simple inheritance)
I created a table for ConcretePerson, another one for SystemUser (only with the Id), other for Tutor and other for Student (only with the Id too). The problem is that a partner is criticizing me (and with good reasons) that the ConcretePerson table should have fields like "IsStudent", "IsTutor" and so on, to improve the performance and don't let NH make a lot of joins to find a student...

What can I do??

Thanks in Advance!,
Diego


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.