Post

Replies

Boosts

Views

Activity

Reply to SwiftData does not cascade delete
Same here, I have to remove the inverse in one-to-many case. Looks like it's a bug in SwiftData since CoreData's behavior confirms the necessity of the inverse.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’24
Reply to SwiftData Many to One Cascade Delete not working as I expect in Xcode15 Beta 7 & 8
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).
Replies
Boosts
Views
Activity
Mar ’24