Created
July 14, 2014 06:18
-
-
Save nsillik/38c10d7c0443df8887f9 to your computer and use it in GitHub Desktop.
ughhhhhh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ManagedObjectContext : NSManagedObjectContext { | |
func insert<T : NovelTManagedObject where T: EntityNamable>() -> T { | |
let entityName = T.entityName() | |
var managedObject = T(entity: NSEntityDescription.entityForName(entityName, inManagedObjectContext: self), insertIntoManagedObjectContext: self) | |
return managedObject as T | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment