db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: subquery: max & size()
Date Thu, 21 Feb 2008 16:58:43 GMT
Hi Christiaan,

As I read the BNF for this filter, there's nothing to prevent it.

But you are right that it might be difficult if not impossible to  
translate this into SQL. Have you tried it with your favorite database  
or JDO implementation?

Craig

On Feb 21, 2008, at 7:14 AM, Christiaan wrote:

>
> Hi,
> a question about subqueries. With the subquery spec, should it be  
> possible
> to execute the following filter, which should return the nodes with  
> the
> maximum children?
>
> "children.size() == (select max(node.children.size()) from x.y.Node  
> node)"
>
> I am asking this since the size() is probably translated into a  
> count() and
> I don't believe it is allowed to perform an aggregate on another  
> aggregate
> in sql.
>
> regards,
> Christiaan
> -- 
> View this message in context: http://www.nabble.com/subquery%3A-max---size%28%29-tp15613074p15613074.html
> Sent from the JDO - Development mailing list archive at Nabble.com.
>

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Mime
View raw message