Actually even with a static list it is a DBStringListProperty. StringListProperty is there to store multi selects in one big text fields instead of separate rows in the database. I believe you are not getting results for another reason. Are you sure you are using multiple selects ? Because if you are not, then it is a StringProperty and the query should be written a little differently. Ludovic [email protected] wrote:
I see the Blog code has an example to search on a DBStringListProperty, but I have a static list, which I believe is a StringListProperty. If I try to use the following SQL:
#set ($sql = ", BaseObject as obj, StringListProperty as prop join prop.list list where obj.name=doc.fullName and obj.className='ReleaseInfo.BuildStatus' and obj.id=prop.id.id and prop.id.name='recommended' and list='Distributed' order by doc.creationDate desc")
I get the following error:
Wrapped Exception: could not resolve property: list of: com.xpn.xwiki.objects.StringListProperty select distinct doc.web, doc.name, doc.creationDate from com.xpn.xwiki.doc.XWikiDocument as doc , com.xpn.xwiki.objects.BaseObject as obj, com.xpn.xwiki.objects.StringListProperty as prop join prop.list list where obj.name=doc.fullName and obj.className='ReleaseInfo.BuildStatus' and obj.id=prop.id.id and prop.id.name='recommended' and list='Distributed' order by doc.creationDate desc?
It seems like it should work ok, so I don't know why I'm getting that error. If I simply change StringListProperty to DBStringListProperty I don't get an error, but also I don't get any results. I can change to using a DBStringListProperty if that's the only way to do it, but I'd like to keep it as it is if at all possible. Thanks ...
shawn.
------------------------------------------------------------------------
-- 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 XPertNet: http://www.xpertnet.fr/ Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost AIM: nvludo Yahoo: ludovic