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
This is something that Cosmos (and all other document storage systems) support natively. It is the EF Core provider which prevents a developer from using this normal functionality.
I just spent an hour searching the (very very limited) EF Core Cosmos provider docs, blogs, the EF Core repo, ect... trying to figure out what was causing this exception:
'The property [...] could not be mapped because it is of type 'ICollection', which is not a supported primitive type or a valid entity type. Either explicitly map this property, or ignore it using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'.'
Whether or not the provider supports this functionality isn't what I'm concerned about (though, this seems like a big feature gap), but it should be mentioned somewhere in the EF Core Cosmos provider docs that this is a current limitation, along with the exception message to help developers figure out why this doesn't work.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
ID: 738deb7b-d752-f628-3860-fe53891cadb0
Version Independent ID: e0a18db9-d605-2a78-b77a-d22375dcfd4e
Just ran into this issue as well while following MS's own recommendations on modeling and partitioning. Having to create separate complex objects just for this bloats our scheme here.
Currently there is a feature missing from the EF Core Cosmos provider - it cannot handle collections of primitive types on entities.
This is something that Cosmos (and all other document storage systems) support natively. It is the EF Core provider which prevents a developer from using this normal functionality.
I just spent an hour searching the (very very limited) EF Core Cosmos provider docs, blogs, the EF Core repo, ect... trying to figure out what was causing this exception:
Whether or not the provider supports this functionality isn't what I'm concerned about (though, this seems like a big feature gap), but it should be mentioned somewhere in the EF Core Cosmos provider docs that this is a current limitation, along with the exception message to help developers figure out why this doesn't work.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: