Skip to content

Commit

Permalink
Merge pull request #81 from UdL-EPS-SoftArch/crud-Pet
Browse files Browse the repository at this point in the history
crud-Pet
  • Loading branch information
rogargon authored Mar 28, 2024
2 parents d036661 + 61557d2 commit 151e200
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/main/java/cat/udl/eps/softarch/demo/domain/Pet.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,4 @@ public class Pet extends UriEntity<Long> {

@ManyToOne
public Shelter isIn;

@ManyToMany
public User[] favouritedBy;
}
5 changes: 5 additions & 0 deletions src/main/java/cat/udl/eps/softarch/demo/domain/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.springframework.security.crypto.password.PasswordEncoder;

import java.util.Collection;
import java.util.List;

@Entity
@Table(name = "DemoUser") //Avoid collision with system table User
Expand Down Expand Up @@ -75,4 +76,8 @@ public boolean isCredentialsNonExpired() {
public boolean isEnabled() {
return true;
}

@ManyToMany
public List<Pet> favouritedPets;

}

0 comments on commit 151e200

Please sign in to comment.