You can retrieve the document names that have an object of class MySpace.MyClass with the following query (the one provided by Jerome needs priviledge access to the API). #set($docnamelist=$xwiki.searchDocuments(", BaseObject as obj where doc.fullName=obj.name and obj.className='MySpace.MyClass'")) Ludovic Jerome Velociter a écrit :
Hi,
Please someone correct me if I'm wrong.
I think xwiki objects cannot be instance of types (such as "StaticListClass"), but only of xwiki classes. the types (String, StaticList, etc.) are only intended to be classes properties.
There is a privileged API to make queries that can return objects or properties : $xwiki.search($wheresql). Privileged means the velocity script running it needs to be saved by someone with the "programming" right allowed.
It can then retrieve your objects this way :
#set($myobjects=$xwiki.search("select obj from BaseObject as obj where obj.className='MySpace.MyClass'"))
Have fun, Jerome
On 6/6/07, *[email protected] <mailto:[email protected]>* <[email protected] <mailto:[email protected]>> wrote:
Hello,
I have problems making a query to retrieve from the database all the objects that are from a certain class (e.g "TryClass") and of a certain type as well (e.g "StaticListClass"). Can anyone give me a hint please?
Thank you very much.
Evelina Slatineanu
-- You receive this message as a subscriber of the [email protected] <mailto:[email protected]> mailing list. To unsubscribe: mailto: [email protected] <mailto:[email protected]> For general help: mailto: [email protected] <mailto:[email protected]>?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
------------------------------------------------------------------------
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- Ludovic Dubost Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost AIM: nvludo Yahoo: ludovic