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

[BUGFIX beta] Inverse null relationships should throw if model doesn't exist 3 #4718

Merged
merged 2 commits into from
Dec 15, 2016

Conversation

canufeel
Copy link

this is continuation of #4675 which is closed in favour of this one.

2.6.0 Introduced a bug such that for { inverse: null } relationships the relationship target is not checked at model creation time. However without { inverse: null } we would get an error when trying to create a model with relationship to another model that doesn't exist. This PR tries to bring in consistent behaviour for such cases - perform a check for model type during model creation and throw an error if the model is not present in the store.

Petr Kosikhin added 2 commits November 21, 2016 18:12
… at least in debug to avoid introducing potential bugs and display appropriate error messages. for performance those checks in prod should be disabled
… at least in debug to avoid introducing potential bugs and display appropriate error messages. for performance those checks in prod should be disabled. rebase
@bmac bmac merged commit 7f4c840 into emberjs:master Dec 15, 2016
@bmac
Copy link
Member

bmac commented Dec 15, 2016

Thanks @canufeel.

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.

4 participants