From 696f5cea5c1ad8429b841120aaa452db8732a1f1 Mon Sep 17 00:00:00 2001 From: Shak <88886274+mechakdotdev@users.noreply.github.com> Date: Wed, 2 Oct 2024 16:22:27 +0100 Subject: [PATCH] Foreing key names should be camel case (#11) --- src/main/java/taskmanager/entity/Label.java | 2 +- src/main/java/taskmanager/entity/Task.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/taskmanager/entity/Label.java b/src/main/java/taskmanager/entity/Label.java index 8a0cd11..c01c988 100644 --- a/src/main/java/taskmanager/entity/Label.java +++ b/src/main/java/taskmanager/entity/Label.java @@ -14,7 +14,7 @@ public class Label { private @Id Long id; @ManyToOne(fetch = FetchType.LAZY) - @JoinColumn(name = "task_id") + @JoinColumn(name = "taskId") @NonNull private Task task; diff --git a/src/main/java/taskmanager/entity/Task.java b/src/main/java/taskmanager/entity/Task.java index 0314520..3b8ba13 100644 --- a/src/main/java/taskmanager/entity/Task.java +++ b/src/main/java/taskmanager/entity/Task.java @@ -17,7 +17,7 @@ public class Task { private @Id Long id; @ManyToOne - @JoinColumn(name = "project_id") + @JoinColumn(name = "projectId") @NonNull private Project project; @@ -25,6 +25,9 @@ public class Task { @NonNull private List