Skip to content

Commit

Permalink
Merge pull request #182 from softeerbootcamp4th/feature/#180-fix-rush…
Browse files Browse the repository at this point in the history
…-event-result

fix: 순환 참조 에러를 막기 위해 BaseUser의 participants 필드에 @JsonIgnore 애노테이션 추가
  • Loading branch information
k000927 authored Aug 19, 2024
2 parents 1f61969 + 21d50ad commit 7658081
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import JGS.CasperEvent.domain.event.entity.participants.LotteryParticipants;
import JGS.CasperEvent.domain.event.entity.participants.RushParticipants;
import JGS.CasperEvent.global.enums.Role;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import jakarta.persistence.*;
import lombok.EqualsAndHashCode;
Expand All @@ -19,10 +20,12 @@ public class BaseUser extends BaseEntity {

@JsonManagedReference
@OneToOne(mappedBy = "baseUser", cascade = CascadeType.ALL)
@JsonIgnore
private LotteryParticipants lotteryParticipants;

@JsonManagedReference
@OneToOne(mappedBy = "baseUser", cascade = CascadeType.ALL)
@JsonIgnore
private RushParticipants rushParticipants;

public void updateLotteryParticipants(LotteryParticipants lotteryParticipant) {
Expand Down

0 comments on commit 7658081

Please sign in to comment.