santi.gs
santi.gs

Reputation: 704

CoreData error: 'NSInternalInconsistencyException', reason: Cannot set value for attribute with undefined type: property ... for optional UUID

I have a CoreData entity (named Canvas)which contains an attribute: selectedCardID of type UUID?.

My CoreData entity is managed by my own NSManagedObject Subclass with the following line:

extension Canvas {

    @NSManaged public var selectedCardID: UUID?

}

When attempting to set a value to selectedCardID I get the following error

"Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot set value for attribute with undefined type: property = "selectedCardID"; entity = "(<NSEntityDescription: 0x2823f0160>) name Canvas

I don't understand what the error message means by undefined type when I've added UUID? to to both the subclass and xcdatamodel file.

Any help would be greatly appreciated.

Upvotes: 0

Views: 262

Answers (0)

Related Questions