【发布时间】:2018-04-07 10:54:28
【问题描述】:
我目前正在处理 Spring Data JPA 规范。我遇到了以下问题:How can I define the following SQL Join with just JPA Specifications?
SELECT * FROM competition c
LEFT JOIN participation p ON c.id = p.competition_id
LEFT JOIN team t ON p.team_id = t.id
WHERE t.name = 'WDB'
请注意,Competition、Participation 和 Team 是 JPA 实体 (@Entity)!
【问题讨论】:
-
您是否正在尝试做类似stackoverflow.com/questions/19977130/… 的事情?
标签: spring hibernate spring-data-jpa specifications jpa-criteria