mirror of
https://gitlab.com/etc404/software-engineering-project.git
synced 2026-05-10 20:52:58 +00:00
Resolve merge
'
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 37 KiB |
Reference in New Issue
Block a user