-->
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: HQL on collections
PostPosted: Sat Nov 14, 2009 4:13 am 
Regular
Regular

Joined: Mon Jun 13, 2005 12:38 pm
Posts: 56
Location: Austin, TX
I have the following Domain classes:

Instructor
Class
School

Instructors have a collection of Classes and a class is associated to a school.

I need to be able to query for all instructors in a school. I've tried the following and it's not working:

'Select i from Instructor i, Course c where c.school = :school and c in elements(i.courses)'

I've tried other variations without any luck. Any suggestions?

-Mike

BTW, I'm doing this in grails 1.1.1. I assume it shouldn't matter though.

_________________
Michael Masters


Don't forget to rate.


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.