Skip to content

Commit

Permalink
feat: notification 엔티티에 FetchType 명시
Browse files Browse the repository at this point in the history
  • Loading branch information
kimhalin committed Oct 4, 2023
1 parent d37b0fa commit afe2be7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;

import javax.persistence.*;

Expand All @@ -15,6 +16,7 @@
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Where(clause = "is_deleted = false")
@SQLDelete(sql = "UPDATE notification SET is_deleted = true WHERE notification_id = ?")
public class Notification extends BaseEntity {

Expand All @@ -23,7 +25,7 @@ public class Notification extends BaseEntity {
@Column(name = "notification_id")
private Long id;

@ManyToOne
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "member_id", nullable = false)
private Member member;

Expand Down

0 comments on commit afe2be7

Please sign in to comment.