I want to do something like this in my domain/entity object :
@Entity
@NamedQueries({
@NamedQuery(name=\"favouriteCats\", query=\"from Cat c inner join on Us
Case Issue, Right query would be:
from Cat c inner join on Usercat uc where uc.isfavourtie = true and uc.user = :user
Note : C in Cat is capital, U in Usercat is capital where as c in Usercat is small and f in isfavourite is small.
I think this might work for you, but I am guessing your Usercat class here:
select c from Usercat as uc inner join uc.cat as c where uc.isFavourtie = true and uc.user = :user