0

Is there a way to write the following sql using hibernate criteria?

select A.columnA1, B.columnB1, C.columnC1 
from A inner join B on A.fk_id = B.id 
inner join C on C.fk_id = B.id

This question is slightly different from Hibernate Criteria and multiple join

Community
  • 1
  • 1
maxhuang
  • 2,681
  • 1
  • 21
  • 26
  • possible duplicate of [Hibernate Criteria Join with 3 Tables](http://stackoverflow.com/questions/8726396/hibernate-criteria-join-with-3-tables) – Jens Jun 27 '14 at 08:22
  • No, they are not the same. – maxhuang Jun 27 '14 at 08:25
  • What is the difference to your problem? – Jens Jun 27 '14 at 08:26
  • [Hibernate Criteria Join with 3 Tables](http://stackoverflow.com/questions/8726396/hibernate-criteria-join-with-3-tables) and [Hibernate Criteria and multiple join](http://stackoverflow.com/questions/2252468/hibernate-criteria-and-multiple-join) are similar. The answer that you provided solves the following SQL: select A.columnA1, B.columnB1, C.columnC1 from A inner join B on **A.fk_id = B.id** inner join C on **B.fk_id = C.id** – maxhuang Jun 27 '14 at 08:34

0 Answers0