When I execute query using find(id)
then it works OK.
But when I use createQuery
method like
select u from User u where u.id = 1
then I get error that it is an array.
So I want to know if it always returns an array even if the result is 1?
I tried getMaxResults(1)
but I get the same error