csviri
csviri

Reputation: 1229

Simple (E1 AND E2) OR (E3 AND E4) expression in QueryDSL

How do I express in QueryDSL where clause in form:

 WHERE (E1 AND E2) OR (E3 AND E4) 

E1..E4 are arbitrary boolean expressions. The point is to have a query started within parenthesis, thus (E1 AND E2).

Upvotes: 8

Views: 10597

Answers (1)

ponzao
ponzao

Reputation: 20944

where(e1.and(e2).or(e3.and(e4)))

Upvotes: 11

Related Questions