Ben Packard
Ben Packard

Reputation: 26476

How much does Core Data store?

Just a small question I can't find an answer to.

If I add a data model, including all attributes for each class, and generate core data classes for these, I can of course get everything to persist.

But I can also add non-core data attributes to a class. Will these persist also? Simply by virtue of belonging to a stored object? Will it be any different for basic data types vs objects?

I would assume these will not be saved, but thought it was worth checking.

Upvotes: 1

Views: 102

Answers (1)

Andrew Madsen
Andrew Madsen

Reputation: 21373

No. Core Data only saves modeled properties. It's perfectly fine, and often desired, to add additional properties to your NSManagedObject subclass, but they'll behave just like properties on any other object and will not be saved to disk.

Upvotes: 2

Related Questions