Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/main/java/com/issueDive/entity/Comment.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,14 @@ public class Comment {
@OneToMany(mappedBy = "parent", cascade = CascadeType.ALL, orphanRemoval = true)
private List<Comment> children = new ArrayList<>();

@Column(name = "created_at", updatable = false, insertable = false)
@Column(name = "created_at", nullable = false, updatable = false)
private LocalDateTime createdAt;

@Column(name = "updated_at", insertable = false)
@Column(name = "updated_at", nullable = false)
private LocalDateTime updatedAt;

public void changeDescription(String description) { this.description = description; }


@PrePersist
public void prePersist() {
LocalDateTime now = LocalDateTime.now();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/issueDive/entity/Label.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ public class Label {
@Column(length = 200)
private String description;

@Column(name = "created_at", updatable = false)
@Column(name = "created_at", nullable = false, updatable = false)
private LocalDateTime createdAt;

@Column(name = "updated_at")
@Column(name = "updated_at", nullable = false)
private LocalDateTime updatedAt;

@PrePersist
Expand Down
Loading