@javax.persistence.Entity @Table(name = "EMPLOYEE", schema="ORA") @SQLUpdate( sql= "update ORA.EMPLOYEE set NAME =? WHERE SEQ_ID =? and AGE < ? ") class Person{ @Id @Column(name = "SEQ_ID", length = 10, nullable = false, precision = 10, scale = 0) private int id; @Column(name = "AGE", length = 10, nullable = false, precision = 10, scale = 0) private int age; @Column(name = "NAME, length = 20, nullable = false) private String name }
Unit test case failed becuase of Caused by: java.sql.SQLException: Missing IN or OUT parameter at index:: 3
How do I set the parameter for AGE? Does hibernate support this?
If I remove "and AGE < ?" condition in the SQLUPDATE it works.
Please update your suggestions. Thanks
|