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 java.util.List;
@@ -58,11 +58,13 @@ public class Recipe {
// Recipe ingredients relationship
@OneToMany(mappedBy = "recipe", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY)
@NotEmpty(message = "At least one ingredient is required")
//hopfully add consistent order
@OrderBy("orderIndex ASC")
private List<RecipeIngredient> recipeIngredients = new ArrayList<>();
// Recipe Steps relationship
@OneToMany(mappedBy = "recipe", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY)
//hopefully to add order
@OrderBy("stepNumber ASC")
private List<Step> steps = new ArrayList<>();
@@ -176,7 +178,6 @@ public class Recipe {
public void setUpdatedAt(LocalDateTime updatedAt) {
this.updatedAt = updatedAt;
this.updatedAt = updatedAt;
}
public List<RecipeIngredient> getRecipeIngredients(){
@@ -227,3 +228,4 @@ public class Recipe {
this.cost = cost;
}
}
@@ -113,3 +113,4 @@ public class RecipeIngredient {
this.orderIndex = orderIndex;
}
}