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
Originally submitted by @Enngage: When deserializing one Kontent element into multiple properties of different types, only the first type gets resolved correctly.
When these two properties are included in a single model, DescriptionString won't get resolved. If you put the JsonPropertyAttribute to the other property, the IRichTextContent won't get resolved.
Expected behavior
Both properties should get resolved correctly.
Additional context
The problem is with caching the resolved properties. The fix should be relatively simple - just extend the caching key of
the processedItems collection by adding the target property type.
Brief bug description
Originally submitted by @Enngage: When deserializing one Kontent element into multiple properties of different types, only the first type gets resolved correctly.
Repro steps
When these two properties are included in a single model,
DescriptionString
won't get resolved. If you put theJsonPropertyAttribute
to the other property, theIRichTextContent
won't get resolved.Expected behavior
Both properties should get resolved correctly.
Additional context
The problem is with caching the resolved properties. The fix should be relatively simple - just extend the caching key of
the
processedItems
collection by adding the target property type.Sample occurrence:
https://github.com/Kentico/kontent-delivery-sdk-net/blob/38de66829a7d1cc07bddbffc3febbf29f33788bd/Kentico.Kontent.Delivery/ContentItems/ModelProvider.cs#L169
Make sure all occurrences of
processedItems
in theModelProvider
are covered.The text was updated successfully, but these errors were encountered: