File tree Expand file tree Collapse file tree 6 files changed +11
-8
lines changed
src/main/java/org/dfbf/soundlink/domain Expand file tree Collapse file tree 6 files changed +11
-8
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments