bugfix: json recursion error at friendships on getProfile
LocationBasedServices/sumoc-backend/pipeline/head This commit looks good

This commit is contained in:
2026-03-04 12:23:28 +01:00
parent 2b267400c4
commit 7862029773
@@ -1,6 +1,7 @@
package SuMoC.backend.user.models;
import SuMoC.backend.user.enums.FriendShipStatus;
import com.fasterxml.jackson.annotation.JsonBackReference;
import jakarta.persistence.*;
import lombok.*;
@@ -26,10 +27,12 @@ public class Friendship {
@ManyToOne
@JoinColumn(name = "user_id", nullable = false)
@JsonBackReference("user-friendships")
private User user;
@ManyToOne
@JoinColumn(name = "friend_id", nullable = false)
@JsonBackReference("friend-friendships")
private User friend;
@Enumerated(EnumType.STRING)