Skip to content

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

Merged
bmac merged 2 commits into
warp-drive-data:masterfrom
canufeel:fix/inverse-null-relationships
Dec 15, 2016
Merged

[BUGFIX beta] Inverse null relationships should throw if model doesn't exist 3#4718
bmac merged 2 commits into
warp-drive-data:masterfrom
canufeel:fix/inverse-null-relationships

Conversation

@canufeel

Copy link
Copy Markdown

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 warp-drive-data:master Dec 15, 2016
@bmac

bmac commented Dec 15, 2016

Copy link
Copy Markdown
Contributor

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