XWQL used for retireve list of items using database list attribute

Hi,
I need to execute a query to retrieve a list of document using a specific where condition.

Example
I have several pages that implement ProjectClass. All Pages have a list of attributes. In particular, I need to use “tecnologies” attribute. It is a Database List.

class

I need to extract all pages of ProjectClass that have specific string into “tecnologies” attribute

Use case
Page 1
tecnologies: [“Java”, “MariaDB”]

Page 2
tecnologies: [“Java”, “Android”]

Page 3
tecnologies: [“Android”, “Spring”]

from doc.object(Main.Config.Templates.ProjectClass.WebHome) as project

I need to execute query to get all projects that use Java technologies

How can I write my query?

Hi @lsantaniello! if you look at Query Module (XWiki.org), you will find lots of examples on how to build xwql queries.

Thanks @acotiuga. I have already read the guide but I have not found the solution. could you please help me?

I just needed to do this. the member of operator is what you need.

In my case:

select doc.fullName from Document doc, doc.object(MySpace.MyClass) o where 'my string' member of o.myProp

(@lsantaniello)

1 Like