Commit 9dfc63be by Patryk Czarnik

Orders i Customers - rozwiązanie problemu cyklicznej zależności

parent ce4312e4
......@@ -7,6 +7,8 @@ import jakarta.validation.constraints.Pattern;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnore;
/**
* The persistent class for the customers database table.
......@@ -39,6 +41,7 @@ public class Customer extends WspolnaNadklasa implements Serializable {
//bi-directional many-to-one association to Order
@OneToMany(mappedBy="customer")
@JsonIgnore
private List<Order> orders;
public Customer() {
......
......@@ -7,6 +7,8 @@ import jakarta.validation.constraints.Min;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
/**
* The persistent class for the order_products database table.
......@@ -34,6 +36,7 @@ public class OrderProduct extends WspolnaNadklasa implements Serializable {
//bi-directional many-to-one association to Order
@ManyToOne
@JoinColumn(name="order_id", insertable=false, updatable=false)
@JsonIgnore
private Order order;
//uni-directional many-to-one association to Product
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment