Hi. Note that this line: #set( $qParticipations = "from doc.object('$participationClassName') as participation where doc.fullName <> 'waihonapediaResearchParticipationTemplate' and participation.research = :thisresearch" and participation.family = :thisUser) is invalid (you closed the " too soon). But I guess it's not your problem. Also, I really doubt that you have a page called 'waihonapediaResearchParticipationTemplate' (it's supposed to be a fullname). There is also invalid simple quotes (') in doc.object. So the correct query should be: #set( $qParticipations = "from doc.object(WaihonaCode. waihonapediaResearchParticipationClass) as participation where doc.fullName <> 'WaihonaCode.waihonapediaResearchParticipationTemplate' and participation.research = :thisresearch and participation.family = :thisUser") I hope it helps, 2016-09-27 14:03 GMT+02:00 Gerritjan Koekkoek <[email protected]>:
Hi,
I have this class:
#set( $participationClassName = "WaihonaCode. waihonapediaResearchParticipationClass" )
Class properties
researchparticipation.family (family: List of Users)
researchparticipation.research (research: Database List)
researchparticipation.participate (participate: Boolean)
researchparticipation.datasend (datasend: Boolean)
I have this XWQL:
#set( $qParticipations = "from doc.object('$participationClassName') as participation where doc.fullName <> 'waihonapediaResearchParticipationTemplate' and participation.research = :thisresearch" and participation.family = :thisUser)
I'm getting velocity error:
Caused by: org.hibernate.QueryException: could not resolve property: research of: com.xpn.xwiki.objects.BaseObject [ select doc.fullName from com.xpn.xwiki.doc.XWikiDocument as doc , com.xpn.xwiki.objects.BaseObject as participation where
When doing similar on a class where class properties are of type string I have no Issues?
What should I do with these properties: List of Users (always only 1) and Database List (always only 1)?
Gerritjan Koekkoek Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS Visit our website<http://www.cdlsworld.org> Facebook<https://www.facebook.com/gerritjan.koekkoek> email<[email protected]>
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project