mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-23 09:51:12 +01:00
XCode7 beta 6 updates
This commit is contained in:
@@ -80,12 +80,10 @@ public extension BaseDataTransaction {
|
||||
var existingObjects = [T]()
|
||||
for object in objects {
|
||||
|
||||
do {
|
||||
if let existingObject = (try? self.context.existingObjectWithID(object.objectID)) as? T {
|
||||
|
||||
let existingObject = try self.context.existingObjectWithID(object.objectID) as! T
|
||||
existingObjects.append(existingObject)
|
||||
}
|
||||
catch _ { }
|
||||
}
|
||||
return existingObjects
|
||||
}
|
||||
@@ -101,12 +99,10 @@ public extension BaseDataTransaction {
|
||||
var existingObjects = [T]()
|
||||
for objectID in objectIDs {
|
||||
|
||||
do {
|
||||
if let existingObject = (try? self.context.existingObjectWithID(objectID)) as? T {
|
||||
|
||||
let existingObject = try self.context.existingObjectWithID(objectID) as! T
|
||||
existingObjects.append(existingObject)
|
||||
}
|
||||
catch _ { }
|
||||
}
|
||||
return existingObjects
|
||||
}
|
||||
|
||||
@@ -81,12 +81,10 @@ public extension DataStack {
|
||||
var existingObjects = [T]()
|
||||
for object in objects {
|
||||
|
||||
do {
|
||||
if let existingObject = (try? self.mainContext.existingObjectWithID(object.objectID)) as? T {
|
||||
|
||||
let existingObject = try self.mainContext.existingObjectWithID(object.objectID) as! T
|
||||
existingObjects.append(existingObject)
|
||||
}
|
||||
catch _ { }
|
||||
}
|
||||
return existingObjects
|
||||
}
|
||||
@@ -102,12 +100,10 @@ public extension DataStack {
|
||||
var existingObjects = [T]()
|
||||
for objectID in objectIDs {
|
||||
|
||||
do {
|
||||
if let existingObject = (try? self.mainContext.existingObjectWithID(objectID)) as? T {
|
||||
|
||||
let existingObject = try self.mainContext.existingObjectWithID(objectID) as! T
|
||||
existingObjects.append(existingObject)
|
||||
}
|
||||
catch _ { }
|
||||
}
|
||||
return existingObjects
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user