Skip to content

Commit 52fdf11

Browse files
committed
add back reverted code
1 parent effb47f commit 52fdf11

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

main-app/main-orm/src/main/java/gt/app/domain/Comment.java

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import jakarta.persistence.Entity;
44
import jakarta.persistence.EnumType;
55
import jakarta.persistence.Enumerated;
6+
import jakarta.persistence.JoinColumn;
67
import lombok.Data;
78

89
import java.util.Objects;
@@ -15,8 +16,10 @@ public class Comment extends BaseAuditingEntity {
1516
@Enumerated(EnumType.STRING)
1617
private CommentStatus status = CommentStatus.AWAITING_APPROVAL;
1718

19+
@JoinColumn(nullable = false)
1820
private Long articleId;
1921

22+
@JoinColumn(nullable = true)
2023
private Long parentCommentId;
2124

2225
public Comment() {

main-app/main-webapp/src/test/resources/application.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ spring:
99
datasource:
1010
url: jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=MYSQL
1111
jpa:
12-
show-sql: true
12+
show-sql: false
1313
open-in-view: false
1414
hibernate:
1515
ddl-auto: none # we use liquibase

0 commit comments

Comments
 (0)