-->
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: Use of wildcards in subqueries in HQL
PostPosted: Wed Apr 02, 2008 9:49 am 
Newbie

Joined: Tue Jan 22, 2008 9:53 am
Posts: 18
Hey guys,

I have a problem and i couldnĀ“t solve it with an elegant solution.

One stupid but representative example is:

from Parent p where p.name in (select c.parent_name from Children c where c.name='John')

Another example would be:

from Parent p where exists (from Children c where p.name = c.parent_name)

This is ok... but.. If my subquery returns parent's name containing or not a family name, but the p.name field contains only the first name ?

How can i match them ? Is it possible to use wildcards in this situation ?

Thanks for your time and attention.

T.H.


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.