Isn't doc.object(Class) part of XWiki core API?
I thought it was an alias of $doc.getObject("Class")

I want to know what APIs XWQL has access to, but I couldn't find the
information.
On Mon, Nov 12, 2012 at 11:42 PM, Jeremie BOUSQUET <
jeremie.bousq...@gmail.com> wrote:

> doc.getObjects("MyClass") is from the xwiki core java api, but is not part
> of the XWQL querying language.
>
> The query:
>
> select srv.port from Document doc, doc.object(Private.Network Services) as
> srv order by srv.port
>
> ... translates to " select "port" field from all XObjects that are of
> class "Private.Network Services", ordering by "port" field "
> So this query would retrieve the value of "port" field from all of these
> XObjects (that we name "srv" in the query), wherever they are and whatever
> their count.
>
>
>
>
> 2012/11/12 crocket <crockabisc...@gmail.com>
>
>> doc.getObjects was there since I had multiple instance of the same class.
>>
>>
>>
>> On Mon, Nov 12, 2012 at 8:32 PM, Jeremie BOUSQUET <
>> jeremie.bousq...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I think this is not correct:
>>> select srv from IN (doc.getObjects("Private.Network Services")) srv order
>>> by srv.port
>>>
>>> Should be more something like:
>>> select srv.port from Document doc, doc.object(Private.Network Services)
>>> as
>>> srv order by srv.port
>>>
>>> Replacing the "select srv.port" by what fields you want to retrieve.
>>>
>>> Though obviously I'm not sure about what you wanted to achieve with your
>>> request to start with ...
>>>
>>> Br,
>>> Jeremie
>>>
>>>
>>> 2012/11/12 crocket <crockabisc...@gmail.com>
>>>
>>> > Yes, I read it, and it seems collection member declarations don't work
>>> in
>>> > xwiki.
>>> >
>>> >
>>> > On Mon, Nov 12, 2012 at 6:13 PM, Jerome Velociter <jer...@velociter.fr
>>> > >wrote:
>>> >
>>> > > Le 12/11/12 09:37, crocket a écrit :
>>> > >
>>> > >  I tried to execute a Query and saw an error below.
>>> > >>
>>> > >> Caused by: org.xwiki.query.**QueryException: Exception while
>>> translating
>>> > >> [select srv from IN (doc.getObjects("Private.**Network Services"))
>>> srv
>>> > >> order by srv.port] XWQL query to the [hql] language. Query
>>> statement =
>>> > >> [select srv from IN (doc.getObjects("Private.**Network Services"))
>>> srv
>>> > >> order by srv.port]
>>> > >>
>>> > >> Although I read JPQL documents, I couldn't come out with an answer.
>>> > >>
>>> > >> Does anybody know how to write a correct XWQL statement?
>>> > >>
>>> > >
>>> > > Have you read
>>> http://extensions.xwiki.org/**xwiki/bin/view/Extension/**
>>> > > Query+Module#**HQueryLanguageExamples<
>>> >
>>> http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module#HQueryLanguageExamples
>>> > >?
>>> > >
>>> > > Jerome
>>> > >
>>> > >> ______________________________**_________________
>>> > >> users mailing list
>>> > >> users@xwiki.org
>>> > >> http://lists.xwiki.org/**mailman/listinfo/users<
>>> > http://lists.xwiki.org/mailman/listinfo/users>
>>> > >>
>>> > >
>>> > > ______________________________**_________________
>>> > > users mailing list
>>> > > users@xwiki.org
>>> > > http://lists.xwiki.org/**mailman/listinfo/users<
>>>  > http://lists.xwiki.org/mailman/listinfo/users>
>>> > >
>>> > _______________________________________________
>>> > users mailing list
>>> > users@xwiki.org
>>> > http://lists.xwiki.org/mailman/listinfo/users
>>> >
>>> _______________________________________________
>>> users mailing list
>>> users@xwiki.org
>>> http://lists.xwiki.org/mailman/listinfo/users
>>>
>>
>>
>
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to