Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed invalid call of NSManagedObject.fetchRequest() #372

Merged
merged 1 commit into from
Jul 21, 2018
Merged

Fixed invalid call of NSManagedObject.fetchRequest() #372

merged 1 commit into from
Jul 21, 2018

Conversation

regexident
Copy link
Contributor

@regexident regexident commented Apr 13, 2018

Calling NSManagedObject.fetchRequest() is invalid:

This method is only legal to call on subclasses of NSManagedObject that represent a single entity in the model.

https://developer.apple.com/documentation/coredata/nsmanagedobject/1640605-fetchrequest

The proper way is to call good old NSFetchRequest(entityName: self.entityName()), which gets bridged to the specialized NSFetchRequest<…>.

Calling `NSManagedObject.fetchRequest()` is invalid:

> This method is only legal to call on **subclasses of `NSManagedObject`** that represent a single entity in the model.

https://developer.apple.com/documentation/coredata/nsmanagedobject/1640605-fetchrequest
@atomicbird atomicbird merged commit fc2a15b into rentzsch:master Jul 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants