Checking in to switch computers BECAUSE XCODE IS JUST BEACHBALLING ON MY IMAC GODDAMNIT.

This commit is contained in:
Brent Simmons 2017-08-19 11:43:52 -07:00
parent e7897e21d9
commit 8d5d94e1a9
2 changed files with 12 additions and 6 deletions

View File

@ -40,18 +40,24 @@ public final class DatabaseLookupTable {
public func saveRelationships(for objects: [DatabaseObject], relationshipName: String, database: FMDatabase) {
}
public func removeRelationships(for objects: [DatabaseObject], relationshipName: String, database: FMDatabase) {
removeLookupsForForeignIDs(objects.databaseIDs(), database)
var objectsWithNoRelationships = [DatabaseObject]()
var objectsWithRelationships = [DatabaseObject]()
objects.forEach { (object)
if let relatedObjects = object.relatedObjectsWithName(relationshipsName)
}
}
}
private extension DatabaseLookupTable {
func removeRelationships(for objects: [DatabaseObject], relationshipName: String, database: FMDatabase) {
removeLookupsForForeignIDs(objects.databaseIDs(), database)
}
func attachRelationshipsUsingLookupTable(to objects: [DatabaseObject], lookupTable: LookupTable, database: FMDatabase) {
let primaryIDs = lookupTable.primaryIDs()

Binary file not shown.