-->
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 across multiple tables
PostPosted: Tue Feb 17, 2009 5:56 pm 
Newbie

Joined: Mon Oct 20, 2008 1:50 pm
Posts: 7
Hi,

Just looking for a bit of advice on the best approach here.

My Employee class contains a reference to another manager Employee and a Department class. Both the Employee and Department classes are already mapped.

Due to performance reasons I'm looking to create a new class to retrieve only the attributes that I require.

These include the manager's name and the department name. I've looked into a few ways to approach this but as far as I can see the <join> tag won't work as it's not a 1-to-1 relationship.
Is there another way to do this using Hibernate?

The other options I've considered are SQL using JDBC or creating a new view of the data I require and then mapping to this.

What would be the best approach?

Thanks.


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.