@@ -0,0 +1,1758 @@
+package pl.mycalories.model;%0D%0A%0D%0Aimport com.fasterxml.jackson.annotation.JsonBackReference;%0D%0A%0D%0Aimport javax.persistence.*;%0D%0A%0D%0A@Entity%0D%0A@SequenceGenerator(name = %22idgen%22, sequenceName = %22product_meal_id_seq%22, allocationSize = 1)%0D%0Apublic class ProductMeal extends AbstractModel %7B%0D%0A%0D%0A    private int amount;%0D%0A%0D%0A    @OneToOne%0D%0A    @JoinColumn(name = %22product_id%22)%0D%0A    private Product product;%0D%0A%0D%0A    @ManyToOne(fetch = FetchType.LAZY, targetEntity = Meal.class)%0D%0A    @JoinColumn(name = %22meal_id%22)%0D%0A    @JsonBackReference%0D%0A    private Meal meal;%0D%0A%0D%0A    public int getAmount() %7B%0D%0A        return amount;%0D%0A    %7D%0D%0A%0D%0A    public void setAmount(int amount) %7B%0D%0A        this.amount = amount;%0D%0A    %7D%0D%0A%0D%0A    public Product getProduct() %7B%0D%0A        return product;%0D%0A    %7D%0D%0A%0D%0A    public void setProduct(Product product) %7B%0D%0A        this.product = product;%0D%0A    %7D%0D%0A%0D%0A    public Meal getMeal() %7B%0D%0A        return meal;%0D%0A    %7D%0D%0A%0D%0A    public void setMeal(Meal meal) %7B%0D%0A        this.meal = meal;%0D%0A    %7D%0D%0A%0D%0A    @Override%0D%0A    public boolean equals(Object o) %7B%0D%0A        if (this == o) return true;%0D%0A        if (!(o instanceof ProductMeal)) return false;%0D%0A        if (!super.equals(o)) return false;%0D%0A%0D%0A        ProductMeal that = (ProductMeal) o;%0D%0A%0D%0A        if (amount != that.amount) return false;%0D%0A        if (product != null ? !product.equals(that.product) : that.product != null) return false;%0D%0A        return meal != null ? meal.equals(that.meal) : that.meal == null;%0D%0A    %7D%0D%0A%0D%0A    @Override%0D%0A    public int hashCode() %7B%0D%0A        int result = super.hashCode();%0D%0A        result = 31 * result + amount;%0D%0A        result = 31 * result + (product != null ? product.hashCode() : 0);%0D%0A        result = 31 * result + (meal != null ? meal.hashCode() : 0);%0D%0A        return result;%0D%0A    %7D%0D%0A%7D%0D%0A

add product_meal model class