Skip to content

Commit

Permalink
Merge pull request #137 from ttakkeun/refac
Browse files Browse the repository at this point in the history
pet 엔티티에서 Record @onetomany 복구
  • Loading branch information
do-dop authored Oct 21, 2024
2 parents da89997 + 34323ba commit 1eeec27
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/ttakkeun/ttakkeun_server/entity/Pet.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ public class Pet extends BaseEntity {
@JoinColumn(name = "member_id")
private Member member;

@Builder.Default
@OneToMany(mappedBy = "pet", cascade = CascadeType.ALL)
private List<Record> RecordList = new ArrayList<>();

public void updateImage(String imageUrl) {
this.petImageUrl = imageUrl;
}
Expand Down

0 comments on commit 1eeec27

Please sign in to comment.