I have a Client entity with an OneToOne relation with Contact. If I want to get the client name, I need to write:
client.getContact().getLastName()
I use querydsl lib to filters client list in my spring boot app
/api/clients?contact.lastName=Doe
My controller signature:
public ResponseEntity<ResponseListDTO> getClients (
@QuerydslPredicate(root = Client.class) Predicate predicateClient,
Pageable pageable)
It works well: predicate is well created and filters works.
But now I need to filter on a field inside two relationship level:
client.getContact().getAddress().getCity()
So I wan't to write:
/api/clients?contact.address.city=XXX
But its not mapped with @QuerydslPredicate. No error but the @QuerydslPredicate predicate is still null (like if no filters).
Thanks!