Checking in to switch computers BECAUSE XCODE IS JUST BEACHBALLING ON MY IMAC GODDAMNIT.
This commit is contained in:
parent
e7897e21d9
commit
8d5d94e1a9
|
@ -40,18 +40,24 @@ public final class DatabaseLookupTable {
|
||||||
|
|
||||||
public func saveRelationships(for objects: [DatabaseObject], relationshipName: String, database: FMDatabase) {
|
public func saveRelationships(for objects: [DatabaseObject], relationshipName: String, database: FMDatabase) {
|
||||||
|
|
||||||
|
var objectsWithNoRelationships = [DatabaseObject]()
|
||||||
}
|
var objectsWithRelationships = [DatabaseObject]()
|
||||||
|
|
||||||
public func removeRelationships(for objects: [DatabaseObject], relationshipName: String, database: FMDatabase) {
|
objects.forEach { (object)
|
||||||
|
if let relatedObjects = object.relatedObjectsWithName(relationshipsName)
|
||||||
removeLookupsForForeignIDs(objects.databaseIDs(), database)
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private extension DatabaseLookupTable {
|
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) {
|
func attachRelationshipsUsingLookupTable(to objects: [DatabaseObject], lookupTable: LookupTable, database: FMDatabase) {
|
||||||
|
|
||||||
let primaryIDs = lookupTable.primaryIDs()
|
let primaryIDs = lookupTable.primaryIDs()
|
||||||
|
|
BIN
ToDo.ooutline
BIN
ToDo.ooutline
Binary file not shown.
Loading…
Reference in New Issue