diff --git a/src/main/java/id/ac/ui/cs/advprog/snackscription_subscriptionbox/model/Item.java b/src/main/java/id/ac/ui/cs/advprog/snackscription_subscriptionbox/model/Item.java index dc9049f..b83498d 100644 --- a/src/main/java/id/ac/ui/cs/advprog/snackscription_subscriptionbox/model/Item.java +++ b/src/main/java/id/ac/ui/cs/advprog/snackscription_subscriptionbox/model/Item.java @@ -1,5 +1,6 @@ package id.ac.ui.cs.advprog.snackscription_subscriptionbox.model; +import com.fasterxml.jackson.annotation.JsonBackReference; import jakarta.persistence.*; import lombok.Getter; import lombok.Setter; @@ -19,15 +20,15 @@ public class Item { private int quantity; @ManyToMany(mappedBy = "items") + @JsonBackReference private List subscriptionBoxes; - // Konstruktor default - public Item() {} - - // Konstruktor dengan parameter public Item(String id, String name, int quantity) { this.id = id; this.name = name; this.quantity = quantity; } + + public Item() { + } } \ No newline at end of file