-->
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.  [ 3 posts ] 
Author Message
 Post subject: How to query for coll owner based on contained element prop?
PostPosted: Thu May 05, 2005 3:29 am 
Regular
Regular

Joined: Fri Oct 01, 2004 2:19 am
Posts: 111
Location: Melbourne, Australia
If I have the following setup:
Code:
class A { Set<B> bs; }
class B { C ref; }
class C { int id; }


How do I form a query that returns instances of A that have members
of their B collection point to a certain instance of C based on the
property value of prop

in JDO I've seen the contains method which seems to do what is
needed something like (a.contains(b) && b.c.id = :id). Can it be done in H3?

_________________
Cheers,

Bonny

please don't forget to rate :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 05, 2005 10:56 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Code:
select a from A as a inner join a.bs as b where b.c.id = :id


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 05, 2005 6:16 pm 
Regular
Regular

Joined: Fri Oct 01, 2004 2:19 am
Posts: 111
Location: Melbourne, Australia
steve wrote:
Code:
select a from A as a inner join a.bs as b where b.c.id = :id


Thanks!

_________________
Cheers,

Bonny

please 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.  [ 3 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.