> On 6/14/05, Mike Kienenberger <mkienen..laska.net> wrote:
> > If you only want the count and don't want to load any objects, just use
> > SQLTemplate.
> >
> > http://www.objectstyle.org/cayenne/userguide/fetch/sqltemplate.html
Nick Stuart <nicholas.stuar..mail.com> wrote:
> I read through that documentation, but it doesn't really appear to do
> anything different then the normal SelectQuery besdies being able to
> write it in SQL. I was wanting to do something like SELECT COUNT(*)
> FROM Object and just got the int result, with out loading all the
> child records etc.
>
> Just reading the docs there it doesn't appear to let me do something like
that.
Yep, as far as I know, that's exactly how it can be made to work. I
haven't had need to use it myself yet.
Just make sure to use setFetchingDataRows(true) so it doesn't try to convert
the result into a DataObject.
This archive was generated by hypermail 2.0.0 : Tue Jun 14 2005 - 17:03:20 EDT