我有三个实体:Block
和View
想要TargetBlock
为以下 sql 创建一个 JPA Criteria 查询。
select * from Block INNER JOIN TargetBlock tb ON tb.blockID = b.blockID INNER JOIN view v ON tb.viewID = v.viewID
块有很多意见和很多TargetBlocks
。
我有三个实体:Block
和View
想要TargetBlock
为以下 sql 创建一个 JPA Criteria 查询。
select * from Block INNER JOIN TargetBlock tb ON tb.blockID = b.blockID INNER JOIN view v ON tb.viewID = v.viewID
块有很多意见和很多TargetBlocks
。
有关 Criteria API 的文档,请参阅,
http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Basic_JPA_Development/Querying/Criteria#Join