-->
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: need help with relationship mapping
PostPosted: Tue Jul 11, 2006 10:42 am 
Newbie

Joined: Tue Feb 21, 2006 12:36 pm
Posts: 3
We have a legacy schema that I am using to retrieve data from using Hibernate 3. I have a provider and address entities. A provider can have many addresses. But the join isn't simple. I'm struggling to come up with my relationship mapping for this scenario.

If I were to write my own sql, the sql to join the data would be something like this:

Code:
select *
from provider p inner join address a on trim(p.prov_nbr) = trim(a.addr_nbr) and trim(a.addr_mode) = 'P' and a.addr_type = 'D'


Anyone have any thoughts?


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.