From daf16bff101edf581180e277ad4c2cb52a7d215b Mon Sep 17 00:00:00 2001 From: Antt02 Date: Mon, 25 Mar 2024 18:15:20 +0100 Subject: [PATCH] moved favourite relation to user --- src/main/java/cat/udl/eps/softarch/demo/domain/Pet.java | 3 --- src/main/java/cat/udl/eps/softarch/demo/domain/User.java | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/cat/udl/eps/softarch/demo/domain/Pet.java b/src/main/java/cat/udl/eps/softarch/demo/domain/Pet.java index 4d2f08f5..cd82c311 100644 --- a/src/main/java/cat/udl/eps/softarch/demo/domain/Pet.java +++ b/src/main/java/cat/udl/eps/softarch/demo/domain/Pet.java @@ -24,7 +24,4 @@ public class Pet extends UriEntity { @ManyToOne public Shelter isIn; - - @ManyToMany - public User[] favouritedBy; } diff --git a/src/main/java/cat/udl/eps/softarch/demo/domain/User.java b/src/main/java/cat/udl/eps/softarch/demo/domain/User.java index 885707b3..45512161 100644 --- a/src/main/java/cat/udl/eps/softarch/demo/domain/User.java +++ b/src/main/java/cat/udl/eps/softarch/demo/domain/User.java @@ -75,4 +75,7 @@ public boolean isCredentialsNonExpired() { public boolean isEnabled() { return true; } + + @ManyToMany + Pet[] favouritedPets; }