Request by String value in list of string with XWQL

Hello,

As mentionned in the title, I have a class which contain as property a list of String and I would like to request in an XWQL document by a value in this list

for exemple in Java

        String statement =
                "from doc.object(MySpace.OIDCClass) as client where client.maintainers LIKE :username";

            List<String> clients = null;
            
            try {
            	
            	String usernameLike = "%"+username+"%";
            	
                clients =
                    this.queryManager.createQuery(statement, Query.XWQL)
                    .bindValue("username", username)
                    .execute();

I also tried with an IN clause where client.maintainers IN (:username)" but it doesn’t really have sense

To simplify I would like some thing like `where client.maintainers CONTAINS (:username)"``

So the property maintainers is a List of string (I’m not using XWikiUser class for some reasons) how could I request for document where one item of the maintainers list contain an occurence of my search (in that case username)

I could consider HQL too, but I don’t really know how the list of string is represented in the database or entities from a xwiki point of view

Maybe the solution and a sample could appears here
https://extensions.xwiki.org/xwiki/bin/view/Extension/Query%20Module

Thanks :slight_smile:

Hello, any ideas ?

Basically I just want to query every XWiki document, that contains MyClass, where my search string is an element in a List of String of an attribute of MyClass. (Not sure it’s more comprehensive described like this)

Thanks.