You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generally, our data is from some data source. It's supposed to be able to refresh and get the same result back (controlled via Fill method).
However, we may need to override the data if we cannot directly modify the source. For example, we may not want the way a TV episode's name is rendered. In this case, we have two options, one is for general conversion that we add the logic to run every time for every item. The other one would be for individual items that we record how we want to modify the data and apply it whenever it's reFilled.
Say we have a data object like
{
"id": "Merlin",
"overview": "An epic story about a warlock.",
"seasons": [
{
"id": "1",
"title": "First Season"
}
]
}
And we want to override the title to Season one. For that, we should be able to call an override API like, PUT /tv_shows/<id>, with a Dictionary<string, object>:
{
"overview": "new overview",
"seasons/0/title": "new title"
}
The stored data should look like,
{
"$metadata": {
"overview": "new overview",
"seasons/0/title": "new title"
},
"id": "Merlin",
"overview": "new overview",
"seasons": [
{
"id": "1",
"title": "new title"
}
]
}
And no matter how the data changes, the specified fields will be overridden afterwards.
This can potentially be merged with PATCH, but no details are thought through.
The text was updated successfully, but these errors were encountered:
Generally, our data is from some data source. It's supposed to be able to refresh and get the same result back (controlled via
Fill
method).However, we may need to override the data if we cannot directly modify the source. For example, we may not want the way a TV episode's name is rendered. In this case, we have two options, one is for general conversion that we add the logic to run every time for every item. The other one would be for individual items that we record how we want to modify the data and apply it whenever it's re
Fill
ed.Say we have a data object like
And we want to override the
title
toSeason one
. For that, we should be able to call an override API like,PUT /tv_shows/<id>
, with aDictionary<string, object>
:The stored data should look like,
And no matter how the data changes, the specified fields will be overridden afterwards.
This can potentially be merged with
PATCH
, but no details are thought through.The text was updated successfully, but these errors were encountered: