Reply to SwiftData Predicate Issue Maybe, those codes can help your: let object = MyObject(name: "name 2") let predicate = #Predicate{ $0.name == "name 2" } try? modelContext.delete(model: MyObject.self, where: predicate) Developer Tools & Services Xcode Mar ’24