Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. public interface UserRepository extends JpaRepository<User, Long>
  2. {
  3. User findByEmailIgnoreCase(String email);
  4.  
  5. @Query("select u from User u where u.id in (:ids)")
  6. Set<User> getByIdInSet(@Param("ids") Set<Long> ids);
  7. }
  8.  
  9. Caused by: java.lang.IllegalArgumentException: You have attempted to set a value of type class org.eclipse.persistence.indirection.IndirectSet for parameter ids with expected type of class java.lang.Long from query string select u from User u where u.id in (:ids).
  10. at org.eclipse.persistence.internal.jpa.QueryImpl.setParameterInternal(QueryImpl.java:933)
  11. at org.eclipse.persistence.internal.jpa.EJBQueryImpl.setParameter(EJBQueryImpl.java:593)
  12. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  13. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  14. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  15. at java.lang.reflect.Method.invoke(Method.java:606)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement