如何在eclipselink jpa中编写Join查询

时间:2017-07-31 07:32:29

标签: java mysql sql jpa

我正在jpa eclipselink中开发一个服务器应用程序。 这是我的查询,当我在我的sqlworkbench中运行它时工作正常:

=SUM(A1:E1)-C1

我有3个表SELECT * FROM `BuildingsTable` AS Buliding LEFT JOIN ServiceCallsTable AS Calls ON ( Calls.`buildingId` = Buliding.id ) LEFT JOIN SchedualReviewsTable AS Review ON ( Review.`buildingId` = Buliding.id ) WHERE Buliding.id =1 BuildingsTableServiceCallsTable

SchedualReviewsTable

中的buildingID变量

TaskServiceCallsTable来自SchedualReviewsTable

这是我的代码:

Task

如何在JPA中编写此查询?

0 个答案:

没有答案