-->
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: "Logical join" in hibernate
PostPosted: Wed Oct 07, 2009 3:10 pm 
Beginner
Beginner

Joined: Thu Nov 02, 2006 2:23 pm
Posts: 33
Suppose that i have two entities - customer, book.
That dosnt have "physical relation" (they dont have FK to PK).

Both entities can can be joined based on two columns.

For example:
select * from book, customer where customer.author = book.author and customer.publisher = book.publisher

I dont want load the rellevant book by query and set them on customer. I dont to this by mapping.

To map a collection of books on Customer entities and the books will be loaded by join the given two columns.

I need this only for view.

I know that it can be achive by using in entityresultset but this is ugly. Are you know another way to map a "logical join"?

Thank you


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.