Open
Description
func cancella(at offset: IndexSet) {
guard let intindex = Array(offset).first else { return }
let id = dm.Storage[intindex].properties["id"] as? String ?? ""
DataManager.Shared.cancellaPosto(id)
}
func cancellaPosto(_ ID: String) {
let operazioneSearch = Search<Entity>(graph: DB).where(.type("Posti") && "id" == ID)
let operazione = operazioneSearch.sync(completion: nil)
if let opeDaCanc = operazione.first {
opeDaCanc.delete()
if let index = Storage.firstIndex(of: opeDaCanc) {
self.Storage.remove(at: index)
self.objectWillChange.send()
}
}
DB.async {(Bool, error) in
if let e = error {
print(e.localizedDescription)
}
}
}
Fatal error: [Graph Error: Cannot obtain permanent objectID]: file /Users/schulz/Desktop/POI MapNote/POI MapNote/Graph/ManagedNode.swift, line 40
2019-12-09 15:53:14.847221+0100 Simple List[48128:2685330] Fatal error: [Graph Error: Cannot obtain permanent objectID]: file /Users/schulz/Desktop/POI MapNote/POI MapNote/Graph/ManagedNode.swift, line 40
Activity