0

I was trying out Spring ExampleMatcher for creating a query that requires use of in clause and between clause.

public class A{
    private Long id;    
    private B b;
    private D d;
    private Date created;
}

public class B {
    private Long id;
    private C c;
    private Long sequence;
}

public class C {
    private Long id;
    private String externalName;
}

public class D {
    private Long id;
}

I need to create a query that matches in clause on A.b.c.externalName, equal clause on A.d.id and between operator on A.b.sequence fields.

Is it possible to do create a query using ExampleMatcher that fulfills above scenario.

Sample HQL : SELECT a FROM A a WHERE a.d.id = :subscriberId AND a.b.c.externalName IN :externalNames and a.b.sequence between (:startSequence, :endSequence)

Please help !

0 Answers0