Skip to content

Commit

Permalink
[Fix] - Database 예약어였던 Entity 필드명 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hangillee authored Jul 15, 2024
1 parent f8d6982 commit 502365b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ public class Travelogue {
private String thumbnail;

@OneToMany(mappedBy = "travelogue")
private List<TravelogueDay> days;
private List<TravelogueDay> travelogueDays;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ public class TravelogueDay {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@Column(nullable = false)
@Column(name = "DAY_ORDER", nullable = false)
private Integer order;

@JoinColumn(nullable = false)
@ManyToOne(fetch = FetchType.LAZY)
private Travelogue travelogue;

@OneToMany(mappedBy = "travelogueDay")
private List<TraveloguePlace> places;
private List<TraveloguePlace> traveloguePlaces;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ public class TraveloguePhoto {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@Column(nullable = false)
@Column(name = "PHOTO_KEY", nullable = false)
private String key;

@Column(nullable = false)
@Column(name = "PHOTO_ORDER", nullable = false)
private Integer order;

@JoinColumn(nullable = false)
@ManyToOne(fetch = FetchType.LAZY)
private TraveloguePlace place;
private TraveloguePlace traveloguePlace;
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class TraveloguePlace {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@Column(nullable = false)
@Column(name = "PLACE_ORDER", nullable = false)
private Integer order;

private String description;
Expand All @@ -34,8 +34,8 @@ public class TraveloguePlace {

@JoinColumn(nullable = false)
@ManyToOne(fetch = FetchType.LAZY)
private TravelogueDay day;
private TravelogueDay travelogueDay;

@OneToMany(mappedBy = "traveloguePlace")
private List<TraveloguePhoto> photos;
private List<TraveloguePhoto> traveloguePhotos;
}
3 changes: 3 additions & 0 deletions backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
spring:
h2:
console:
enabled: true
datasource:
driver-class-name: org.h2.Driver
url: jdbc:h2:mem:test
Expand Down

0 comments on commit 502365b

Please sign in to comment.