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: elements() inside select?
PostPosted: Wed Jan 06, 2010 6:15 am 
Newbie

Joined: Wed Apr 08, 2009 7:52 am
Posts: 3
Hi. I have 3 entities: Teacher, Cours, Room.

The relationship Teacher-Cours is 1:n and the relationship Cours-Room is m:n

Now I need to update all the Rooms where there is at least a Cours owned by a certain Teacher.

I'd need something like

'Update Room r set r.valid = true where r in (select elements(cours.rooms) from Cours cours where cours.teacher= :teacher) '

I know elements() is used only in 'where' clause, but I don't know what else can I use here...

Thank you .
Cristi


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.