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
When using EF OwnsOne/OwnsMany properties for nested or complex data structures/mappings JADNC 5 returns inconsistent results, nulls, or errors depending on use of include or sparse fieldsets.
For regular requests with no sparse fields and no includes, properties mapped with OwnsOne act as expected
When includes for other models are requested properties mapped with OwnsOne will return as null or invalid results
When using sparse fields on a resource with OwnsOne mappings, a tracking error is thrown.
Hi @rtablada, thanks for reporting this and providing great repro instructions.
I've verified that #1272 fixes the two cases from your repro, but you may want to do additional testing. Until now, we didn't have any tests for using owned entities. I haven't looked into OwnsMany usage.
One thing to be aware of: Partial updates do not preserve existing values within statistics. For example:
would clear the existing value of gdp. Although EF Core can update just the Population column, JSON:API has no concept of merging the individual fields within an attribute. If you're in need of that, JSON columns may better suit your needs. Adding non-MSSQL support is on the roadmap of EF Core 8.
DESCRIPTION
When using EF OwnsOne/OwnsMany properties for nested or complex data structures/mappings JADNC 5 returns inconsistent results, nulls, or errors depending on use of
include
or sparse fieldsets.OwnsOne
act as expectedOwnsOne
will return as null or invalid resultsOwnsOne
mappings, a tracking error is thrown.STEPS TO REPRODUCE
Full reproduction project: https://github.com/rtablada/JsonApiDotnetExamples
EXPECTED BEHAVIOR
Attrs which expose properties from
OwnsOne
should allow regularAttr
behavior and work withinclude
andfields
as any other exposed attributeACTUAL BEHAVIOR
OwnsOne
Attr
properties...include
operations are requested from query stringOwnsOne
attributeVERSIONS USED
The text was updated successfully, but these errors were encountered: