From e42f27b1733a446e75c1614c085ce8b5f65f43ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Antonio=20Parejo=20Maestre?= Date: Mon, 21 Dec 2020 17:16:31 +0100 Subject: [PATCH] @Data annotation removed due to the undesired effects of the auto-generated equals when we have bidirectional relationships. --- .../samples/petclinic/model/Authorities.java | 5 ++++- .../org/springframework/samples/petclinic/model/User.java | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/springframework/samples/petclinic/model/Authorities.java b/src/main/java/org/springframework/samples/petclinic/model/Authorities.java index 522b215ce7a..405e91135bc 100644 --- a/src/main/java/org/springframework/samples/petclinic/model/Authorities.java +++ b/src/main/java/org/springframework/samples/petclinic/model/Authorities.java @@ -7,8 +7,11 @@ import javax.validation.constraints.Size; import lombok.Data; +import lombok.Getter; +import lombok.Setter; -@Data +@Getter +@Setter @Entity @Table(name = "authorities") public class Authorities extends BaseEntity{ diff --git a/src/main/java/org/springframework/samples/petclinic/model/User.java b/src/main/java/org/springframework/samples/petclinic/model/User.java index b027024d1dc..9a05f6fb1ef 100644 --- a/src/main/java/org/springframework/samples/petclinic/model/User.java +++ b/src/main/java/org/springframework/samples/petclinic/model/User.java @@ -8,9 +8,11 @@ import javax.persistence.OneToMany; import javax.persistence.Table; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; -@Data +@Getter +@Setter @Entity @Table(name = "users") public class User{