Hello,

I have a xwiki doc class with some properties:  'Static List' type and 'Page' 
(multiselect) type.
I try to write a query to retrieve document in one query shot but I encoutered 
problem with 'Page' type.
This query working well based on 
http://platform.xwiki.org/xwiki/bin/view/DevGuide/velocityHqlExamples#HGettingdocumentswhereobjects27propertiesequalssomevalue

select distinct doc.name, doc.creationDate from XWikiDocument as doc, 
BaseObject as obj, StringProperty prop where (doc.fullName=obj.name and 
obj.className='FormSMQ.ACClass' and doc.space='FormSMQ' and doc.hidden=false  
and prop.id.id=obj.id and prop.name='P1_Processus' and prop.value='M3') order 
by doc.creationDate desc

'P1_Processus' is a static list type

But this query doesn't work:
select distinct doc.name, doc.creationDate from XWikiDocument as doc, 
BaseObject as obj, StringProperty prop where (doc.fullName=obj.name and 
obj.className='FormSMQ.ACClass' and doc.space='FormSMQ' and doc.hidden=false  
and prop.id.id=obj.id and prop.name='MY_PAGE_TYPE_PROPERTY_NAME' and 
prop.value='MYVALUE') order by doc.creationDate desc

Ididn't find some "PageProperty" in 
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/xwiki.hbm.xml,
 then I must use DBStringListProperty ?

Any help will be welcome.

Pascal B
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to