Hello,
This is perhaps a bit of a newbie question, but I haven't been able to find an example of a NamedQuery with multiple parameters. This is the one I have:
@NamedQuery(name="mynamedquery", query="SELECT user FROM User user WHERE user.foo=:foo AND user.bar:=bar")
which is called later:
Query query = em.createNamedQuery("mynamedquery").setParameter("foo", user.foo).setParameter("bar", user.bar);
and the exception: "Errors in named queries"
I'd like to find a working example so I can find the mistake?? All the examples I have found only have one parameter (and this works if I delete the AND user.bar:=bar)
Thank you!
|