Try to delete var recipe: Recipe? = nil and inverse: \FoodMenu.recipe, it should be fixed.
Unlike CoreData, SwiftData simplifies the declarations. Just need to add var menus: [FoodMenu]? with @Relationship(deleteRule: .cascade).
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: