i have such class relationship classa---(many2one)--->classb----(many2one)-->classc
i want search out following conditions 1. c's id=1 2. c null
how write jpql in such case?
if you're using jpa 2.1, can use on clause:
select a left join a.b b left joib b.c c on c.id = 1
Comments
Post a Comment