Skip to content

NSManagedObjects subclass with a different class name #321

@nicolettemanas

Description

@nicolettemanas

What

I have an Entity named Transaction. I generated an NSManagedObject subclass and named it TransactionManagedObject since I already have an existing Transaction (NSObject) class.

I tried fetching data from it using:

try! context.request(TransactionManagedObject.self).filtered(with: "id", equalTo: id).fetch()

However, I am getting the following error:

caught "NSInternalInconsistencyException", "NSFetchRequest could not locate an NSEntityDescription for entity name 'TransactionManagedObject'"

It works fine with managed object classes with the same entity name.

Context

I am using SugarRecord 3.0.0 in Swift3 with CoreData

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