JPA 2 criteria API: How to select values from various joined tables without using Metamodel?
- 阅读更多 关于 JPA 2 criteria API: How to select values from various joined tables without using Metamodel?
问题 I have the following type of query that I wish to convert into a jpa criteria query and the following table structure: Table A 1-->1 Table B 1<--* Table C (proceedings) *-->1 Table D(prcoeedingsstatus) -------- -------- ------- ------- aID bID cID dID ... .... timestamp textValue f_bID .... f_bID f_dID 1 A has 1 B, 1 B has many proceedings and each proceeding has a proceedingstatus. SELECT a.* FROM ((a LEFT JOIN b ON a.f_b = b.id) LEFT JOIN proceedings ON b.id = proceedings.f_b) RIGHT JOIN