context save: fails after deleting orphans, leaving CoreData in inconsistent state
Bug #1164073 reported by
Mike McCracken
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu One Files App for iOS |
Fix Committed
|
High
|
Mike McCracken |
Bug Description
in U1FilesClient fetchFolderWith
This is not handled, and so leaves the object graph in a bad state.
The problem is in the data model:
Asset and FileNode are related. A FileNode can have an optional Asset, but an Asset must have a related FileNode.
However, the FileNode->Asset relationship delete rule is just 'Nullify', meaning that when we delete a fileNode we do not delete its related asset, we just leave it sitting around with a nil fileNode relationship, making it invalid, and causing errors when we save.
The solution is to make the delete rule "Cascade".
Related branches
lp://staging/~mikemc/ubuntuone-ios-files/fix-dangling-u1asset
- Brian Curtin (community): Approve
- dobey (community): Approve
-
Diff: 44 lines (+4/-2)2 files modifiedFiles.xcodeproj/project.pbxproj (+3/-1)
Files/U1Files.xcdatamodeld/.xccurrentversion (+1/-1)
Changed in ubuntuone-ios-files: | |
importance: | Undecided → High |
Changed in ubuntuone-ios-files: | |
status: | In Progress → Fix Committed |
tags: | added: u1-notrack |
To post a comment you must log in.