fixed objective-c compatibility with NSManagedObject subclass