Skip to content
Snippets Groups Projects
Commit 5237630e authored by Birk Øvstetun Narvhus's avatar Birk Øvstetun Narvhus
Browse files

Fixed get fridg items

parent 59747b97
Branches
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ import java.sql.Date;
@AllArgsConstructor
@NoArgsConstructor
@Getter @Setter
@Data
@Entity(name = "fridge_product")
@Builder
public class FridgeProductAsso {
......
......@@ -42,7 +42,7 @@ public class Fridge{
@OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH},
fetch = FetchType.LAZY, mappedBy = "fridgeId")
@OnDelete(action = OnDeleteAction.CASCADE)
@JsonIgnoreProperties("fridge")
@JsonIgnoreProperties("fridgeId")
List<FridgeProductAsso> products;
......
......@@ -78,7 +78,6 @@ public class Product{
@OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH},
fetch = FetchType.LAZY, mappedBy = "ean")
@OnDelete(action = OnDeleteAction.CASCADE)
@JsonIgnoreProperties({"products"})
@JsonIgnore
List<FridgeProductAsso> fridges;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment