My domain like these:
@Document(collection = "vip")
public class Vip implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private String id;
@Field("package_type")
private String packageType;
@Field("packageServices")
private List<Map<String,Object>> packageServices;...
}
How can I customize the bindings for keys of map in packageServices collection when querying in url? E.g: I have a key name serviceType, how can I bind it in customize method?
@Override
default public void customize(QuerydslBindings bindings, QVip root) {
//?bindings.bind (root.packageServices.any ().)
bindings.bind(String.class).first((StringPath path, String value) ->
path.containsIgnoreCase(value));
//...
}
I have seen Spring Data JPA with Querydsl -- filter by value inside array from URL and https://jira.spring.io/browse/DATACMNS-883. And I believe spring data jpa should support this kinds of query, however I'm a newcomer to QueryDSL and stuck in the problem for a while.
Anyone can help me? Thanks in advance. BTW: I use querydsl version 4.1.0