Could not locate named parameter rookie help how to solve?

The Account class has a
@NamedQuery(name = "Account.updateBill",
query = "UPDATE Account a SET a.amount=:am WHERE ")

public Account updateBillAmount(int id, int amount) {
Query query = em.createNamedQuery("Account.updateBill");
query.setParameter("amount", amount);
query.setParameter("id", id);
int updateData = query.executeUpdate();
return (Account) query.getSingleResult();
I do this in this way.. Why would not locate named parameter could [amount]
I tried query.setParameter(1, amount);
query.setParameter(2, id);
No, for help.

Started by Abelard at December 14, 2016 - 9:54 PM

query.setParameter("am", amount);
query.setParameter("d", id);

Posted by Deborah at December 20, 2016 - 10:06 PM