E-Madd
E-Madd

Reputation: 4582

What is the entity for my NSManagedObject?

I have a view controller that can fetch many different types of entities from my MOC. How can I tell what the entity is for an object of the type NSManagedObject?

Upvotes: 4

Views: 4254

Answers (2)

Giao
Giao

Reputation: 15146

[managedObject entity] will give you an NSEntityDescription. From there you can send it -name to get the entity's name that's a bit more user-friendly.

Upvotes: 13

Martin Cote
Martin Cote

Reputation: 29872

By calling the entity method.

Upvotes: 1

Related Questions