This commit is contained in:
John Rommel Estropia
2015-05-04 12:40:16 +09:00
parent b56c08abd9
commit d043d64cb1
41 changed files with 1583 additions and 214 deletions

View File

@@ -38,14 +38,19 @@ internal extension NSManagedObjectContext {
get {
let number: NSNumber? = self.getAssociatedObjectForKey(&PropertyKeys.shouldCascadeSavesToParent)
let number: NSNumber? = getAssociatedObjectForKey(
&PropertyKeys.shouldCascadeSavesToParent,
inObject: self
)
return number?.boolValue ?? false
}
set {
self.setAssociatedCopiedObject(
setAssociatedCopiedObject(
NSNumber(bool: newValue),
forKey: &PropertyKeys.shouldCascadeSavesToParent)
forKey: &PropertyKeys.shouldCascadeSavesToParent,
inObject: self
)
}
}
@@ -106,13 +111,18 @@ internal extension NSManagedObjectContext {
get {
return self.getAssociatedObjectForKey(&PropertyKeys.observerForWillSaveNotification)
return getAssociatedObjectForKey(
&PropertyKeys.observerForWillSaveNotification,
inObject: self
)
}
set {
self.setAssociatedRetainedObject(
setAssociatedRetainedObject(
newValue,
forKey: &PropertyKeys.observerForWillSaveNotification)
forKey: &PropertyKeys.observerForWillSaveNotification,
inObject: self
)
}
}
}