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

adding an object to the database results in didChangeObject being called instead of didAddObject #44

Closed
amccarri opened this issue Oct 30, 2015 · 1 comment

Comments

@amccarri
Copy link

Looks like this was a result of the change in addOrUpdateObjectWithNotification. Correctly moved the addOrUpdateCall to before the didAdd/DidChange logic, but now since you just added it, it always exists in the database, so it always will fire didChange.

In RLMRealm+Notifications.m see addOrUpdateObjectWithNotification:

@bigfish24
Copy link
Contributor

Yeah that's the issue, the check should occur first and save a BOOL on which it was then, call the addOrUpdate then call the correct logger finally since it is guaranteed to be in Realm at that point.

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

No branches or pull requests

2 participants