-->
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 making 1-on-n a 1-on-1
PostPosted: Tue Nov 10, 2009 6:44 am 
Beginner
Beginner

Joined: Fri Jul 20, 2007 10:38 am
Posts: 49
Hello,

I'm working on extracting some data from a legacy system and there's some data presentation that I have to do.
I've created a mapping file on this table and I need to join another table on a key column (1-on-n). However, there are criteria that makes the joined table 1-1 which is actually what I need:

Say, Person has personId and there's a Pet with a personId and a petType column. This is the select that I want:
select ... from person left join pet pet on (person.personId = pet.personId and petType = 'dunno').

I did a <join element with the key column, now all I need is the additional contraint that the petType is always 'dunno'. I don't see a place holder for this, any way to solve this?

thanks,
lino


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.