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.
|
|