Resolve merge

'
This commit is contained in:
durn
2026-04-21 18:37:28 -06:00
3 changed files with 5 additions and 2 deletions
@@ -1,4 +1,4 @@
package com.example.demo.entity; ackage com.example.demo.entity;
import jakarta.persistence.*; import jakarta.persistence.*;
import java.util.List; import java.util.List;
@@ -58,11 +58,13 @@ public class Recipe {
// Recipe ingredients relationship // Recipe ingredients relationship
@OneToMany(mappedBy = "recipe", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY) @OneToMany(mappedBy = "recipe", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY)
@NotEmpty(message = "At least one ingredient is required") @NotEmpty(message = "At least one ingredient is required")
//hopfully add consistent order
@OrderBy("orderIndex ASC") @OrderBy("orderIndex ASC")
private List<RecipeIngredient> recipeIngredients = new ArrayList<>(); private List<RecipeIngredient> recipeIngredients = new ArrayList<>();
// Recipe Steps relationship // Recipe Steps relationship
@OneToMany(mappedBy = "recipe", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY) @OneToMany(mappedBy = "recipe", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY)
//hopefully to add order
@OrderBy("stepNumber ASC") @OrderBy("stepNumber ASC")
private List<Step> steps = new ArrayList<>(); private List<Step> steps = new ArrayList<>();
@@ -176,7 +178,6 @@ public class Recipe {
public void setUpdatedAt(LocalDateTime updatedAt) { public void setUpdatedAt(LocalDateTime updatedAt) {
this.updatedAt = updatedAt; this.updatedAt = updatedAt;
this.updatedAt = updatedAt;
} }
public List<RecipeIngredient> getRecipeIngredients(){ public List<RecipeIngredient> getRecipeIngredients(){
@@ -227,3 +228,4 @@ public class Recipe {
this.cost = cost; this.cost = cost;
} }
} }
@@ -113,3 +113,4 @@ public class RecipeIngredient {
this.orderIndex = orderIndex; this.orderIndex = orderIndex;
} }
} }
Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB