diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/model/Book.java b/bookstore/src/main/java/com/fjordtek/bookstore/model/Book.java index df6761e..f051aba 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/model/Book.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/model/Book.java @@ -24,6 +24,7 @@ import javax.validation.constraints.NotBlank; import javax.validation.constraints.Pattern; import javax.validation.constraints.Size; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonManagedReference; import com.fjordtek.bookstore.annotation.CurrentYear; @@ -73,6 +74,7 @@ public class Book { name = "bookIdGenerator", sequenceName = "bookIdSequence" ) + @JsonIgnore private Long id; //////////////////// diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/model/Category.java b/bookstore/src/main/java/com/fjordtek/bookstore/model/Category.java index 93dac3a..8d98e78 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/model/Category.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/model/Category.java @@ -12,6 +12,7 @@ import javax.persistence.OneToMany; import javax.persistence.SequenceGenerator; import com.fasterxml.jackson.annotation.JsonBackReference; +import com.fasterxml.jackson.annotation.JsonIgnore; @Entity public class Category { @@ -27,6 +28,7 @@ public class Category { name = "categoryIdGenerator", sequenceName = "categoryIdSequence" ) + @JsonIgnore private Long id; ////////////////////