From 5a1834eef3ca4250b2d32e7fa2a0bace3ef93713 Mon Sep 17 00:00:00 2001 From: Laki Sik Date: Tue, 20 Sep 2016 13:49:59 +0700 Subject: [PATCH] fix modal message create at --- src/main/java/com/ahancer/rr/models/ProposalMessage.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ahancer/rr/models/ProposalMessage.java b/src/main/java/com/ahancer/rr/models/ProposalMessage.java index b5408f9..5a05c30 100644 --- a/src/main/java/com/ahancer/rr/models/ProposalMessage.java +++ b/src/main/java/com/ahancer/rr/models/ProposalMessage.java @@ -67,7 +67,7 @@ public class ProposalMessage implements Serializable { private String referenceId; @Temporal(TemporalType.TIMESTAMP) - @Column(name = "createdAt",updatable=false) + @Column(name = "createdAt",updatable=false,insertable=true) private Date createdAt; @JsonIgnore @@ -85,7 +85,7 @@ public class ProposalMessage implements Serializable { @PrePersist protected void onCreate() { - updatedAt = createdAt = new Date(); + updatedAt = new Date(); } @PreUpdate