I have a database table, and I would like to override the SQLUpdate with the following (Hibernate 3):
@SQLUpdate = (sql = "UPDATE person_user SET description = ?, facility = ?, person_id = ?, slot_number = ?, modify_date = current_utc_date(), modify_time = current_utc_time() WHERE id = ?")
Now, notice that modify_date and time are not using the current values in the object, and there are more columns in the class than placeholders. How do I do this?
Also, the class is declared like so, and I need to know if the declared column order is how the statement gets generated, or is it by the name?
@Column(name="description")
private String description;
@Column(name="facility")
private Integer facility;
@Column(name="modify_time")
private Integer modify_time;
@Column(name="modify_date")
private Integer modify_date;
@Column(name="slot_number")
private Integer slot_number;
@Column(name="person_id")
private Integer person_id;
@Column(name="id")
private Integer id;
|