/** * When called in a subclass of MManagedObject, this method returns the entity description object * that class represents * * This method uses the subclass' name to search the provided MManagedObjectContext for a matching * entity description for the class in which the method is called on. * * @param MManagedObjectContext $context The context in which to perform the search * * @return MEntityDescription The MEntityDescription instance that corresponds to this class */ public static function entityDescription(MManagedObjectContext $context) { return $context->persistentStoreCoordinator()->model()->entityWithName(parent::typeClass()); }