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

model override should work for create and update not just findone and findall #301

Merged
merged 5 commits into from May 2, 2013

Conversation

ccummings
Copy link
Contributor

When I override the model structure, this works fine for findone and findall, however it does not apply to create and update which I then have to manually process when the newly created model instance is returned.

ie. I create an object where the object is nested {note: {id:4}}
When the response on successful create comes back it is also nested by my overridden model is not applied.

In case this is relevant, my experience is with the MooTools version of canjs.

@tracer99
Copy link
Contributor Author

tracer99 commented Mar 5, 2013

Conversation in Forums about this issue: https://forum.javascriptmvc.com/#Topic/32525000001090143

ccummings pushed a commit that referenced this pull request May 2, 2013
model override should work for create and update not just findone and findall
@ccummings ccummings merged commit 59a74a9 into master May 2, 2013
@ccummings ccummings deleted the issue-301 branch May 2, 2013 02:11
@justinbmeyer
Copy link
Contributor

This breaks some other things, specifically around what goes in the model store. The model function does not simply "unbox" the response data, it put things in the store. I'm going to fix this.

@justinbmeyer
Copy link
Contributor

This rears it's ugly head again with #560 and #561.

This needs to be fixed, but might require some breaking API changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants