Hibernate throws NullPointerException from HqlSqlWalker

£可爱£侵袭症+ 提交于 2019-12-04 13:11:38

As @JBNizet correctly pointed out, the problem was that one of the classes (named address to be exact) on the path was not an entity, it was an embeddable object and thus it doesn't need to be joined.

So the second query written correctly in my case would be:

SELECT s FROM Application s
    LEFT JOIN s.product AS product
    LEFT JOIN product.producer AS producer
    LEFT JOIN producer.address.country AS country
WHERE s.nr = ? ORDER BY country.name ASC
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!