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
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).