Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Obtaining entity name from NSMangedObject subclass class object

Is there a bulit-in way to obtain an entity name from the class object of an NSManagedObjectSubclass? I know that this can be readily determined from an instance of a subclass, but I want to ask the class itself. I can write a class function, but I would rather do this introspectively.

like image 751
pickwick Avatar asked Jan 08 '13 16:01

pickwick


1 Answers

You can do it now by executing NSManagedObject.entity().name where NSManagedObject() is your subclass.

like image 64
Vasily Avatar answered Sep 20 '22 06:09

Vasily