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

Allow to pass class to parse()? #12

Open
SpaceK33z opened this issue Mar 17, 2017 · 1 comment
Open

Allow to pass class to parse()? #12

SpaceK33z opened this issue Mar 17, 2017 · 1 comment

Comments

@SpaceK33z
Copy link
Contributor

If you want to replace a model with another model, without instantiating a new class, you now need to do .parse(model.toJS()). Perhaps we can do this automatically. Or maybe this should be a separate function, which replaces that model with the new one while keeping the instance.

@SpaceK33z
Copy link
Contributor Author

I'm leaning towards making this a separate function, because this can have some nasty side-effects. If the model was not instantiated from the same store, it could have different relations then the other models in the store.

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

No branches or pull requests

1 participant