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
Support for pagination, and selective rollback for single attribute #95
Conversation
… the backend. Also improved logging of model errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
}); | ||
}) | ||
return promise.then((payload) => { | ||
return { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be a pretty big breaking change to the API. PromiseArray
extends ArrayProxy
which extends Ember.Object
. If you want, you could just set a meta
property on the array (or something similar). This would allow the return value of a query to jive well with templates. Up to you guys though, I'm not sure what your use cases are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also the Ember.meta
function, which will probably work. I can't remember exactly how it works, but I know I've used it before. 😄
Enabled pagination of store
For example, a document model:
Constructing a query for the store:
Will allow constructing a get request with query params so a backend server can correctly serve up just 10 documents.
You can also get the total (for pagination UI controls, next/last, X of Y, from the new property:
Selective rollback
Instead of doing a rollback on everything, a single attribute can be rolled back: