Hi I am new to hibernate. My question is i need to run the following query in hibernate by joining table A with table B and table B with table C. I am very confused about the syntax i should use to do the same. SELECT A.log_date, A.uid, A.property, A.Property_value, C.type_id, C.name AS Name
FROM table_A A, table_B B, table_C C
WHERE A.uid = B.uid
AND B.Type_Id = C.type_id
where uid is PK of table B and Fk of table A. type_id is PK of table C and FK in table B. log_date,uid and property make composite keys in table A.
I have implemented the composite key logic and it works fine.
My question is can i use hibernate criteria to join the above tables or should i use join annotations inside the pojo for table A and run the query. Request your help.
|