Bob MacCallum wrote:
> 
> I tried this, but there's no "group by" possible on a DataQuery
> (I'm getting and UnsupportedOperationException)
> 
>   DataQuery<FeatureData> featQuery = baseArray.getFeatures();
>   featQuery.include(Include.SHARED);
>   featQuery.join(Hql.innerJoin("reporter", Item.REPORTER.getAlias()));
>   featQuery.group(Hql.property(Item.REPORTER.getAlias(), "externalId"));
>   count = featQuery.count(dc);
> 
> I also tried going from the other direction (from Reporter.getQuery()), but
> you can't join to 'features' it seems.
> 
> Am I missing something?

No you are not. The 'featQuery' is returning FeaureData objects. Tat 
kind of query can't be grouped. The link between features and reporters 
is only mapped from the feaures side, not from the reporters side. It is 
not possible to join features if you are starting with a query for 
reporters.

/Nicklas

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
basedb-devel mailing list
basedb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/basedb-devel

Reply via email to