Created
August 31, 2015 11:14
-
-
Save Bashta/d5ac0b3ecba8ba951f69 to your computer and use it in GitHub Desktop.
Core Data bypasses initialization rules because of @NSManaged. This is a dependency injection of the class Employee
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 Employee: NSManagedObject { | |
init(context: NSManagedObjectContext, | |
name: String, | |
dateOfBirth: NSDate, | |
salary: NSDecimalNumber, | |
employeeId: String = NSUUID().UUIDString, | |
email: String? = nil, | |
address: String? = nil) { | |
// init | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment