-->
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.  [ 2 posts ] 
Author Message
 Post subject: HQL Querying from 2 tables..didn't work
PostPosted: Tue Aug 02, 2005 10:53 pm 
Newbie

Joined: Tue Aug 02, 2005 10:36 pm
Posts: 5
Hi, i'm a HQL newbie...i got 2 tables Player and Manager(Many to 1 relationship)..the SQL equivalent is below..

SELECT *
FROM Player ply INNER JOIN
Holiday hol ON ply.holidayid = hol.id
WHERE (ply.club LIKE 'AC Milan') AND (hol.date like '20050622')

means i want to get the list of players where they play for AC Milan and went for a holiday on 2005/06/22 date.

how do i convert it to a HQL query...i tried..the following

"from Player ply where ply.club like :club and ply.holidayid like (select id from Holiday hol where hol.date like :holDate)"

didn't work


Top
 Profile  
 
 Post subject: Solved
PostPosted: Tue Aug 02, 2005 11:06 pm 
Newbie

Joined: Tue Aug 02, 2005 10:36 pm
Posts: 5
Oops..i solved..ignore the post


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

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.