Skip to content

Commit 509c151

Browse files
authored
merge: pull request #52 from prgrms-web-devcourse-final-project/feat/entity/main
feat/entity/main
2 parents be55173 + fff95e3 commit 509c151

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

src/main/java/org/dfbf/soundlink/domain/blocklist/entity/Blocklist.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ public class Blocklist {
2121
@Column(name = "blocklist_id")
2222
private Long blocklistId;
2323

24-
@ManyToOne
24+
@ManyToOne(fetch = FetchType.LAZY)
2525
@JoinColumn(name = "user_id")
2626
private User user;
2727

28-
@ManyToOne
28+
@ManyToOne(fetch = FetchType.LAZY)
2929
@JoinColumn(name = "blocked_user_id")
3030
private User blockedUser;
3131

src/main/java/org/dfbf/soundlink/domain/chat/entity/ChatRoom.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ public class ChatRoom {
2828
@Column(name = "end_time")
2929
private Timestamp endTime;
3030

31-
@ManyToOne
31+
@ManyToOne(fetch = FetchType.LAZY)
3232
@JoinColumn (name = "request_user_id")
3333
private User requestUserId;
3434

35-
@ManyToOne
35+
@ManyToOne(fetch = FetchType.LAZY)
3636
@JoinColumn(name = "record_id")
3737
private EmotionRecord recordId;
3838

src/main/java/org/dfbf/soundlink/domain/emotionRecord/entity/EmotionRecord.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ public class EmotionRecord {
1919
@Column(name = "record_id")
2020
private Long recordId;
2121

22-
@ManyToOne
22+
@ManyToOne(fetch = FetchType.LAZY)
2323
@JoinColumn(name = "user_id")
2424
private User user;
2525

2626
@Enumerated(EnumType.STRING)
2727
@Column(name = "emotion")
2828
private Emotions emotion;
2929

30-
@ManyToOne
30+
@ManyToOne(fetch = FetchType.LAZY)
3131
@JoinColumn(name = "spotify_id")
3232
private SpotifyMusic spotifyMusic;
3333

src/main/java/org/dfbf/soundlink/domain/emotionRecord/entity/SpotifyMusic.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ public class SpotifyMusic {
2323
@Column(name = "spotify_id")
2424
private String spotifyId;
2525

26+
@Column(name = "video_id")
27+
private String videoId;
28+
2629
@Column(name = "title")
2730
private String title;
2831

src/main/java/org/dfbf/soundlink/domain/user/entity/ProfileMusic.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class ProfileMusic {
2121
@JoinColumn(name = "profile_music_id")
2222
private Long profileMusicId;
2323

24-
@ManyToOne
24+
@ManyToOne(fetch = FetchType.LAZY)
2525
@JoinColumn(name = "spotify_id")
2626
private SpotifyMusic spotifyMusic;
2727

src/main/java/org/dfbf/soundlink/domain/user/entity/User.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class User {
2020
@Column(name = "user_id")
2121
private Long userId;
2222

23-
@OneToOne (cascade = CascadeType.PERSIST)
23+
@OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST)
2424
@JoinColumn(name = "profile_music_id")
2525
private ProfileMusic profileMusic;
2626

0 commit comments

Comments
 (0)