我有以下异常错误:
Caused by: org.hibernate.QueryException: Not all named parameters have been set: [c]
[UPDATE EtudeCredit e SET e.avisfin=:c WHERE e.codeEc=:idEc]
我的代码是::
public EtudeCredit updateavisfin(Integer id, String avisfint) {
Query d= entityManager.createQuery("UPDATE EtudeCredit e SET e.avisfin=:c WHERE e.codeEc=:idEc");
d.setParameter("idEc",id).executeUpdate();
d.setParameter("c",avisfint).executeUpdate();
return (EtudeCredit) d.getSingleResult();}
有什么帮助吗?怎么了?