I am trying to get my head around HQL and run it inside the Persistence window of IntelliJ IDEA.
Here's the thing: I can run simple queries like these:
hql> SELECT offer FROM OfferEntit offer;
hql> SELECT offer FROM OfferEntit offer WHERE offer.id = 1L;
but if I add something like a JOIN
:
hql> SELECT offer FROM OfferEntit offer
JOIN offer.owner AS owner WHERE owner.id = 1L;
I get an empty result. Always. No matter what I do. I have no idea why..
Also
- I checked whether those records exist - yes they do
- I do not get any error logs