On Mon, Jan 21, 2013 at 10:51 AM,  <[email protected]> wrote:
> Hi, I'm trying to write a page to return some LiveTable results.  I'm
> finding that $query.count() is returning -1 instead of the actual number of
> results.  Can anyone tell me why?

You found a bug.. I reported and fixed
http://jira.xwiki.org/browse/XWIKI-8719 . The workaround is, I think,
to use HQL instead of XWQL, until you upgrade to 4.4.1 or newer.

Thanks,
Marius

>
>     {{velocity}}
>     #set($query = $services.query.xwql("from
> doc.object(Invitation.InvitationMailClass) as inv"))
>     #set($invitations = $query.execute())
>     #foreach($invite in $invitations)
>     * $invite
>     #end
>     Number of results is: $query.count()
>     {{/velocity}}
>
> ...gives results:
>
>     Invitation.InvitationMessages
>     Invitation.InvitationMessages
>     Number of results is: -1
>
> I was expecting the number of results to be "2".  I'm trying to make sense
> of the documentation here:
>
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module
>
> ...but it doesn't seem to have much description of the API, and I can't see
> anything on maven.xwiki.org either.
>
> Thanks,
> Matthew Exon
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to