Skip to content

Overriding method in category #17

@olejnjak

Description

@olejnjak

Overriding method in category is not a good idea. Right now I came to issue, that I added new version of my Core data model to the project. And since then I can't run the app as Core data throw an exception ('NSInternalInconsistencyException', reason: 'Can't modify an immutable model.').

Reason is that when initializing Core data stack using Magical Record, it instantiates immutable model which is completely legit and then copies some NSEntityDescriptions. Which causes initialization to fail because it is an NSObject and uses copyWithZone:. That calls implementation from NSObject+RMCopyable and that crashes because it uses setValue:forKey: which can't be used as model is immutable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions