我最近一直在努力用 spring data jpa 加入 3 个表。我有 3 个实体Series
,Dossier
和Item
。Series
有很多Dossiers
,并且Dossier
有很多Items
(关系)。我做了类似的事情Series.join(Dossier_.series).join(Dossier_.items)
,我最终得到了一个加入集。我想进行以下查询:
Select Items from Series,Dossier,Item
Where Series.Id=Dossier.seriesId
and Dossier.id=Item.dossierId
and series.projectId = :param
我不能用 Spring Specifications and criteria api 来表达这个声明....请解释一下