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] Fix store.createRecord with belongsTo when model has @each o… #5277

Conversation

mattraydub
Copy link

@mattraydub mattraydub commented Dec 13, 2017

When passing belongsTo relationship during create (on Model with property using @each observer) the InternalModel.getRecord actually recurses on itself thus calling the modelFactory create 2 times. This is only happening when there is something watching a path on the created model using the @each observer.

This test and fix ensures the create is only called once.

@runspired
Copy link
Contributor

Digging into this PR. I'm not familiar with the issue but seems like a thing we should fix if broken, and there's at least one other bug report I've seen float by lately that looked similar.

@runspired
Copy link
Contributor

This was fixed in #5369

@runspired runspired closed this Apr 2, 2018
@runspired
Copy link
Contributor

Just wanted to circle back and say thank you very much @mattraydub ! I find your failing tests super helpful :) We should rope you in to doing more of them :D

@mattraydub
Copy link
Author

@runspired glad I was able to help

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