I want to perform a simple selection with the conditions spread across 3 tables.
Select a.*
FROM TBL_A a
JOIN TBL_B b ON a.bId=b.Id
JOIN TBL_C c ON a.cId=c.Id
JOIN TBL_D d ON c.dId=d.Id
WHERE (b.value='X' OR c.value='x')
AND d.someFlag=1
Assuming that these tables are mapped correctly, how can such a query be achieved using ICriteria API?
What I have so far doesn't fulfill all of that...
The
ICriteriaquery could look like this, following the documenation:the query snippet: