-
Notifications
You must be signed in to change notification settings - Fork 33
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
Backing store when using deserialize async #379
Comments
Hi @svrooij If I'm understanding you correctly, you effectively want to do the opposite of what you've already implemented for the serialization? i.e. have an optional boolean parameter to "set everything as changed" by default (default value false) If so, is this something you'd like to submit a pull request for provided some guidance? |
@baywet I changed the initial description. (Was written on a tablet) |
Thank you for the additional information. |
I'm willing to create a PR for this, but what do you suggest? Can I just change it to resetting the backing store if someone uses this method to deserialize? I guess it's not used by the other code, that will probably call the code directly without the
|
for consistency I'd align with previous changes we've made: parameter named something like "markAllValuesAsChanged" default false. This way we don't change the current behaviour for people using the methods today. What do you think? |
How do I add an addition parameter to this method? kiota-dotnet/src/abstractions/serialization/KiotaSerializer.Deserialization.cs Lines 166 to 168 in 427e3ff
I heard that the CancellationToken should be the last parameter. If I add it in between, it will be source breaking. Just add a new method? and an obsolete to the old? |
I'm afraid that's the only option here |
Shall I add this to the same PR? #396 |
It'd probably be easier to have separate PRs at this point. |
I was trying to use the serialize / deserialize to save and load an object for the graph api.
The idea was this (graph or any other api):
In this last step I was faced with a 400 error, and after inspecting the request I figured out that none of the properties where sent to the server.
I think that users that actually use this static method or any of the extensions that call this method don't want the backing store.
And I would thus suggest that this method automatically sets the
model.BackingStore.InitializationCompleted
tofalse
. That resulted in the full object being posted.The text was updated successfully, but these errors were encountered: