Skip to content
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

[core] Array flattening in deserializer loses previously de-serialized attributes #15653

Closed
jeremymeng opened this issue Jun 9, 2021 · 0 comments · Fixed by #15655
Closed
Assignees
Labels
Azure.Core bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library.

Comments

@jeremymeng
Copy link
Member

original issue: Azure/ms-rest-js#450

instance = serializer.deserialize(
propertyMapper,
propertyInstance,
propertyObjectName,
options

instance = serializer.deserialize(
propertyMapper,
propertyInstance,
propertyObjectName,
options
);

Any previously deseriaized attributes on the instance before the sequence will be lost.

@jeremymeng jeremymeng added Azure.Core bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. labels Jun 9, 2021
@jeremymeng jeremymeng self-assigned this Jun 9, 2021
jeremymeng added a commit to jeremymeng/azure-sdk-for-js that referenced this issue Jun 9, 2021
Porting fix from Azure/ms-rest-js#451.

When flattening array, we were assigning directly to the result
instance, thus losing any properties that were deserialized previously
in the loop.  The fix is to copy the existing properties over.

Fixes Azure#15653.
jeremymeng added a commit that referenced this issue Jun 10, 2021
…ion (#15655)

Porting fix from Azure/ms-rest-js#451.

When flattening array, we were assigning directly to the result
instance, thus losing any properties that were deserialized previously
in the loop.  The fix is to copy the existing properties over.

Fixes #15653.
sadasant pushed a commit to sadasant/azure-sdk-for-js that referenced this issue Jun 21, 2021
…ion (Azure#15655)

Porting fix from Azure/ms-rest-js#451.

When flattening array, we were assigning directly to the result
instance, thus losing any properties that were deserialized previously
in the loop.  The fix is to copy the existing properties over.

Fixes Azure#15653.
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant