Skip to content

Commit

Permalink
Foreing key names should be camel case (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
mechakdotdev committed Oct 2, 2024
1 parent deeba61 commit 696f5ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/taskmanager/entity/Label.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
5 changes: 4 additions & 1 deletion src/main/java/taskmanager/entity/Task.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@ public class Task {
private @Id Long id;

@ManyToOne
@JoinColumn(name = "project_id")
@JoinColumn(name = "projectId")
@NonNull
private Project project;

@OneToMany(fetch = FetchType.LAZY, mappedBy = "task")
@NonNull
private List<Label> label;

@NonNull
private String title;

@NonNull
private Integer priority;

Expand Down

0 comments on commit 696f5ce

Please sign in to comment.