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

Already on GitHub? Sign in to your account

Fixes #3028 assign collection in _prepareModel #3036

Merged
merged 1 commit into from Mar 18, 2014

Conversation

Projects
None yet
4 participants
Collaborator

tgriesser commented Mar 3, 2014

So looking at it again, the _addReference is more about events and adding to the internal reference hashes than the collection property, so I still think this is alright... it reverts to the previous behavior for this case, but also removes model.collection in cases of failure with wait:true.

Let me know if you disagree on that second piece, but I would assume that attempting to add a model to a collection shouldn't set the "collection" attribute on the model if it's not actually added.

lfac-pt commented Mar 3, 2014

Awesome! 👍

Owner

jashkenas commented Mar 15, 2014

@braddunbar Any thoughts on this?

Collaborator

braddunbar commented Mar 18, 2014

Moving collection assignment back to _prepareModel seems good to me. I'm not sure about the error handler for {wait: true} though. That behavior has been around for some time without any issues reported and as far as I can tell #3028 doesn't mention it.

Collaborator

tgriesser commented Mar 18, 2014

Fair enough, ditched that part of it.

braddunbar added a commit that referenced this pull request Mar 18, 2014

Merge pull request #3036 from tgriesser/create-model-fix
Fixes #3028 assign collection in _prepareModel

@braddunbar braddunbar merged commit 28ac874 into jashkenas:master Mar 18, 2014

1 check was pending

default The Travis CI build is in progress
Details
Collaborator

braddunbar commented Mar 18, 2014

Thanks @tgriesser!

@tgriesser tgriesser deleted the tgriesser:create-model-fix branch Mar 18, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment