I have a entity Document with a list of DocumentValue
@QueryEntity
@Document
public class Document{
private List<DocumentValue> documentValues;
}
DocumentValue can has also a list of DocumentValue
@QueryEntity
public class DocumentValue {
String value;
String name;
String id;
List<DocumentValue> documentValues;
}
I am now trying to do something like
private QDocumentValue getDocumentValuePathByDepth(int depth){
ListPath path = QDocument.document.documentValues;
if (depth != null) {
for (int i = 0; i < depth; i++) {
path = path.documentValues.any();
}
}
}
Does anybody know if its possible to do an eleMatch in that depth?
Like
ListPath<QDocumentValue> query = getDocumentValuePathByDepth(5);
return query.fieldId.eq(documentFilter.getFieldId()).and(query.value.between(from, to));
One element of documentValues in that depth should fulfill both conditions
BR D.C.