IS DataNucleus GAE JPQL different from JPA1 standard?
-
27-09-2019 - |
문제
Query q = em.createQuery("SELECT u FROM SSUser u WHERE u.emailId=?1")
.setParameter(1, email);
I thought this would be a valid query, but then I get:
No results for query: SELECT FROM SSUser u WHERE u.emailId=?1
What's the right way to express this query?
해결책
This query is correct but positional params are currently broken in GAE/J. This is Issue 128: Positional parameters don't work (JPQL). Workaround: use named parameters.
Query q = em.createQuery("SELECT u FROM SSUser u WHERE u.emailId = :email")
.setParameter("email", email);
제휴하지 않습니다 StackOverflow