I recently added a new column "PASSWORD_RESET_REQUIRED" into my user and user_audit table.
Not when I am trying to delete a user I get an error saying :
cannot insert NULL into ("USER_AUD"."PASSWORD_RESET_REQUIRED")
@Entity
@Table(name = "sec_user", schema = "RZUL_DATA")
//Override the default Hibernate delete and set the termination date rather than deleting the record from the db.
@SQLDelete(sql = "UPDATE RZUL_DATA.sec_user SET trmn_dt = sysdate WHERE user_id = ?")
@Audited
public class User {
@NotEmpty
@Column(name = "password_reset_required", updatable = true, insertable = true)
private String isPasswordResetRequired;
... other properties
}
My UserDao delete method:
@Override
public boolean deleteUser(final User user) {
sessionFactory.getCurrentSession().delete(user);
NOTE: Till this point I can see the user.isPasswordResetRequired an a non null.
return true;
}
What part could I be missing?