ember-data-model-fragments
ember-data-model-fragments copied to clipboard
Supplying a unique key to ensure response is correctly mapped for array fragment
Hi, thanks for making this addon it takes care of a much needed use case in ember data.
@goldstarlearning we are using this addon to handle rich json documents in some of our models. The issue we are having has to do with the Array fragments in the library, and the way that response data is applied in the library relies on indexes. https://github.com/lytics/ember-data-model-fragments/blob/master/addon/array/fragment.js#L43
This has a knack for causing issues for us, when the server and client do not order arrays in the same way.
The solution I would like to see in the library is the ability to specify a unique key. This unique key in our case is not necessarily globally unique (think something like an order number etc..). This would provide a more robust way to handling reconciling data.