Re: [xwiki-users] How do I write a correct XWQL statement?

2012-11-14 Thread Jeremie BOUSQUET
2012/11/13 crocket crockabisc...@gmail.com You need to send messages to both me and xwiki-users list. Everybody should share knowledges. What I want to do is extract all object of a class from a specific page, not the entire objects from the wiki database. How should I modify the query in

Re: [xwiki-users] How do I write a correct XWQL statement?

2012-11-14 Thread crocket
Thanks man. https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/xwiki.hbm.xml That's what I've been looking for!! Yay!!! On Wed, Nov 14, 2012 at 5:48 PM, Jeremie BOUSQUET jeremie.bousq...@gmail.com wrote: 2012/11/13 crocket

Re: [xwiki-users] How do I write a correct XWQL statement?

2012-11-14 Thread crocket
But how do I find the names of those corresponding models used in queries? xwikidoc doesn't really remind me of Document, and I don't know how to refer to xwikircs in queries. On Wed, Nov 14, 2012 at 5:48 PM, Jeremie BOUSQUET jeremie.bousq...@gmail.com wrote: 2012/11/13 crocket

Re: [xwiki-users] How do I write a correct XWQL statement?

2012-11-13 Thread crocket
You need to send messages to both me and xwiki-users list. Everybody should share knowledges. What I want to do is extract all object of a class from a specific page, not the entire objects from the wiki database. How should I modify the query in this case? And where can I find all those XWQL

Re: [xwiki-users] How do I write a correct XWQL statement?

2012-11-13 Thread Sergiu Dumitriu
On 11/12/2012 07:57 PM, crocket wrote: Isn't doc.object(Class) part of XWiki core API? I thought it was an alias of $doc.getObject(Class) XWQL doesn't have access to any API method. It's not a scripting language, it's a query language. doc.object(Class) is supposed to be read as: search for

Re: [xwiki-users] How do I write a correct XWQL statement?

2012-11-12 Thread Jerome Velociter
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

Re: [xwiki-users] How do I write a correct XWQL statement?

2012-11-12 Thread crocket
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.frwrote: 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:

Re: [xwiki-users] How do I write a correct XWQL statement?

2012-11-12 Thread Jeremie BOUSQUET
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

Re: [xwiki-users] How do I write a correct XWQL statement?

2012-11-12 Thread crocket
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

Re: [xwiki-users] How do I write a correct XWQL statement?

2012-11-12 Thread crocket
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