diff --git a/templates/machine.swift.motemplate b/templates/machine.swift.motemplate index f1705ce9..cf90c504 100644 --- a/templates/machine.swift.motemplate +++ b/templates/machine.swift.motemplate @@ -44,10 +44,12 @@ class _<$managedObjectClassName$>: <$customSuperentity$> { // MARK: - Life cycle methods + public override init(entity: NSEntityDescription, insertIntoManagedObjectContext context: NSManagedObjectContext!) { super.init(entity: entity, insertIntoManagedObjectContext: context) } - + + public convenience init(managedObjectContext: NSManagedObjectContext!) { let entity = _<$managedObjectClassName$>.entity(managedObjectContext) self.init(entity: entity, insertIntoManagedObjectContext: managedObjectContext)