node to traverse cannot be null (Hibernate SQL)

前端 未结 6 1500
醉酒成梦
醉酒成梦 2021-02-12 03:23

I\'m performing a SQL query through hibernate, which looks like:

SELECT thi 
FROM track_history_items thi 
JOIN artists art 
  ON thi.artist_id = art.id 
WHERE t         


        
6条回答
  •  無奈伤痛
    2021-02-12 04:03

    I have come across this issue several times before as well and it has always been the case that the code was attempting to run a named query by calling createQuery instead of createNamedQuery, e.g. if you have a named query named "FIND_XXX" then the code would be calling entityManager.createQuery(FIND_XXX) which results in it trying to execute the String representing the name of the named query as if it was a standard dynamic query String (which is obviously a problem).

提交回复
热议问题