Hi All,
I need to build a search query using three tables. Tables are linked like this,
I need TABLE_A objects from database.
TABLE_B contains TABLE_A as FK.
TABLE_C contains TABLE_B as FK.
depending on some parameters, I need to build a query that checks TABLE_C, TABLE_B and TABLE_A and returns me TABLE_A objects.
I am using criteria api for querying TABLE_A, can I build query by using criteria api and join TABLE_B and TABLE_C so that I can fetch TABLE_A objects.
Is this possible by using criteria api. If not please suggest me the best approach.
Thanks, Vamsi
|