Java: JPQL select statement
- by bguiz
select x from X x where x.a.id = :a_id -- Always 0 objects selected
Why does the above JPQL statement not work, but the one below work?
select a from A a where a.id = :a_id -- a_obj
select x from X x where x.a = :a_obj -- Always correct number of objects selected
Neither query throws an exception during execution, but a different number of results are obtained.
Thanks