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, *evelyne24(a)gmail.com <mailto:evelyne24@gmail.com>*
<evelyne24(a)gmail.com <mailto:evelyne24@gmail.com>> 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
xwiki-dev(a)objectweb.org <mailto:xwiki-dev@objectweb.org> mailing list.
To unsubscribe: mailto: xwiki-dev-unsubscribe(a)objectweb.org
<mailto:xwiki-dev-unsubscribe@objectweb.org>
For general help: mailto: sympa(a)objectweb.org
<mailto:sympa@objectweb.org>?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws
------------------------------------------------------------------------
--
You receive this message as a subscriber of the xwiki-dev(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws