次のような変数が1つlong[] ids = [10, 11]
あり、次のようなクエリを起動しようとしています:
Query query2 = session.createQuery("update Employee e SET e.isLatest = false where e.id not in (:ids)");
query2.setParameter("ids", ids);
query2.executeUpdate();
しかし、私は次のようなエラーが発生しています
org.postgresql.util.PSQLException: ERROR: operator does not exist: bigint <> character varying
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
パラメータに配列変数を渡すにはどうすればよいNOT IN
ですか? または、そのようなクエリを処理する他の方法はありますか?