Reputation: 86747
I'm trying to set up a db query using spring-data-jpa
and a native query for a postgres
database. But the following does not work. Why?
@Query(value = "SELECT reltuples::bigint AS estimate FROM pg_class WHERE oid = 'public.my_table'::regclass", nativeQuery = true)
public int count();
Result:
java.lang.IllegalArgumentException: org.hibernate.QueryException: Not all named parameters have been set: [:bigint, :regclass;]
Upvotes: 1
Views: 952