Conversation
|
I really like this idea, especially since I make |
|
👍 Partial entities allow nice API optimisations without having to create entity types just made for Ember.js (our current API is quite leaky in this regard unfortunately). |
|
@drogus I'd add a option to |
|
@joostdevries could you elaborate? I don't understand what would be the benefit. |
|
I added a note about saving incomplete records. |
|
@drogus Right now you're suggesting to implement partial loading by default and allowing people to specify what properties might be missing from their API that should not trigger a server query. That approach makes this a breaking change because people with API's that somtimes omit properties will get additional server queries all of a sudden. If you'd instead add an option |
I wouldn't turn it on by default, because of backwards compatibility, as you already mentioned. What's more, this can vary between models; it may make sense for only part of your models, especially if you're working with an API, which you don't control. With that in mind, as soon as you enable partial record loading for a model (or all of the models), it should work automatically out of the box. That said, I agree that there should be an API for a more granular control. I described that in the proposal: https://github.com/emberjs/rfcs/pull/31/files#diff-a99783a2dc2a593ac1cac37a386037c2R86, I believe that your use case (ie. whitelisting or blacklisting properties) is very similar to that one. |
|
👍 |
|
👍 This would be so so so awesome for us. We have a noSQL backend and we have a lot of data denormalization. Right now we have "denormed" versions for all of our models. Having partial loading / entity projections would be a welcomed feature. |
|
I've updated the proposal with a bit more specifics, particularly the public API. |
|
👍 |
|
@drogus and I refactored this a lot after EmberConf, and were working on an addon that would enable this. We should paste the updated version, and I will close this for now. |
😍 👍 |
[Meta] Update README.md based on mailing-list
This is a bit vague at the moment, but I wanted to put it out for discussion and I'll try to add more details as I get feedback
Rendered