spring-in-action-6-samples
spring-in-action-6-samples copied to clipboard
Questions with IngredientRef domain
A domain IngredientRef
is mentioned and created somewhere in chap 1 or 2. But by the end of chapter 3 (starting from Spring Data JPA) the domain of IngredientRef
is already not mentioned.
What is its significance? It is quite confusing.
Exactly. The problem was created right before the 3.2 starts. In JdbcOrderRepository, he created a method saveIngredientRefs(long, List<IngredientRefs>). and called this method from saveTaco() . But while calling the method he passed tacoId and taco.getIngredients() as parameters.. But taco.getIngredients() returns a List<Ingredient> where the saveIngredientRefs() requires a List<IngredientRef>. I am also confused what to do now.
If you have found any solution please let me know.
The solution that I used for this issue was found in another thread. Leaving the link here for anyone still having this problem.
https://github.com/habuma/spring-in-action-6-samples/issues/11#issuecomment-1229146426