-
Notifications
You must be signed in to change notification settings - Fork 77
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
Supporting methods on model instances #227
Comments
Sorry I haven't documented this better, but I already added I haven't added Example: var user = User.inject({ id: 1 });
user.DSUpdate({ name: 'john' }).then(function (user) {
user; // { id: 1, name: 'john' }
}); |
I'd prefer it to be the simple method names It just seems weird to have it |
It's a valid point. However, I made it a point to namespace anything I put on the instance prototype (read: get out of the developer's way) to avoid any potential naming conflicts with something a developer wants to do. That's how it will be going forward. :) |
Thanks for knocking this out so fast @jmdobry ! Got the updates in my repo now and they're great. |
@jmdobry any plans to add DSLoadRelations? organization.DSLoadRelations(["membership", "user"]) Less verbose than: DS.loadRelations("organization", organization.id, ["membership", "user"]) And doesn't require injection of the |
Forgot about that one. I will add it. |
@jmdobry awesome, thanks! :) |
Is it possible to add DSEject as well? |
Sure |
I would like to see the same
save(), destroy(), etc.
on the returned item instances by default. Is there currently a reason why they aren't?For the mean time I am adding them with
defineResource()
.The text was updated successfully, but these errors were encountered: