Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I use "description" as an attribute name for a Core Data entity?

Tags:

People also ask

What is attribute in Core Data?

You can think of attributes as the columns of a table in a database. Attributes store the values of a Core Data record. There are several types of attributes, such as String, Date, Integer, Float, and Boolean. Select the Note entity in the data model editor and click the + button at the bottom of the Attributes table.

What is transformable type in Core Data?

Core Data supports entity attributes of 'Transformable' type. Transformable type allows us to store custom data types as an object of the declared attribute for a record of an Entity. The only requirement is that our custom type should conform to NSCoding or we need to provide a custom value transformer.

How do you use transformable Core Data?

To implement a Transformable attribute, configure it by setting its type to Transformable and specifying the transformer and custom class name in Data Model Inspector, then register a transformer with code before an app loads its Core Data stack.

What is entity in Core Data Swift?

An entity describes an object, including its name, attributes, and relationships. Create an entity for each of your app's objects.


I have a simple Core Data entity that had a string attribute named "description". The program crashes when it hits:

valueForKey:@"description" 

I changed the "description" attribute to "text" and problem solved.

Why does this happen?

Is "description" a reserved key word in Core Data?

Is it related to calling the description method from NSObject?

Is there a reference to these reserved key words if they exist?