We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29fb202 commit 68ce15fCopy full SHA for 68ce15f
src/main/java/com/example/postgresdemo/model/Answer.java
@@ -21,7 +21,7 @@ public class Answer extends AuditModel {
21
@Column(columnDefinition = "text")
22
private String text;
23
24
- @ManyToOne(fetch = FetchType.LAZY)
+ @ManyToOne(fetch = FetchType.LAZY, optional = false)
25
@JoinColumn(name = "question_id", nullable = false)
26
@OnDelete(action = OnDeleteAction.CASCADE)
27
@JsonIgnore
0 commit comments