我有实体:
@Getter
@Setter
@Entity(name = "sendingstate")
public class SendingState {
@Id
protected String sendingStateId;
protected String documentId;
protected String state;
@Column(insertable = false, updatable = false)
protected Date createdAt;
@Column(insertable = false, updatable = false)
protected Date updatedAt;
}
createdAt和updatedAt列由数据库自身自动填充,并且很好。但是当我编写测试时-我希望能够在这些字段中填充自定义值,以便可以将它们保存在db中。有办法吗?