-->
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: Count Query: # of Parents with all children.property = ?.
PostPosted: Mon Jul 26, 2004 4:19 pm 
Regular
Regular

Joined: Mon Sep 29, 2003 9:39 am
Posts: 67
I would like to return the count of a parent class whose children all
have 'true' for a given property.

I'm not quite sure how to do this, this is my attempt so far:

Caused by: net.sf.hibernate.QueryException: outer or full join must be followed by path expression [SELECT count(rp) FROM ReviewPart rp INNER JOIN PriceChange pc WHERE rp.review = :review AND pc.competitive = true AND pc.withinBounds = true AND pc.interchangeCompliant = true Group By rp]

In short, I would like the Parent's state to be a reflection of the collective state of the children. On a per-parent basis, this is easy with iteration.


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.