[xwiki-dev] Query
Ludovic Dubost
ludovic at xwiki.com
Fri Jun 8 14:18:59 CEST 2007
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 at gmail.com <mailto:evelyne24 at gmail.com>*
> <evelyne24 at gmail.com <mailto:evelyne24 at 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 at objectweb.org <mailto:xwiki-dev at objectweb.org> mailing list.
> To unsubscribe: mailto: xwiki-dev-unsubscribe at objectweb.org
> <mailto:xwiki-dev-unsubscribe at objectweb.org>
> For general help: mailto: sympa at objectweb.org
> <mailto:sympa at 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 at objectweb.org mailing list.
> To unsubscribe: mailto:xwiki-dev-unsubscribe at objectweb.org
> For general help: mailto:sympa at objectweb.org?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
More information about the devs
mailing list