-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Cosmos: allow value converters for collections of primitive types #25343
Milestone
Comments
Note from triage: also consider other issues related to primitive collections--see label |
Note for team: either a duplicate of #4179, or already supported if the issue means using value converters explicitly. |
ajcvickers
added a commit
that referenced
this issue
Apr 2, 2024
This change starts using the EF8 primitive collection infrastructure for primitive collections in Cosmos. This involves adding support for nested collections and read-only collections. The main challenge here is supporting all the different collection types when, for example, `List<List<string>>` cannot be cast to `IEnumerable<IEnumerable<string>>`. To support this, we use exact collection types in snapshots, and we use non-generic methods in the nested comparers and serializers. General dictionary mapping still not supported. No extensive query testing done yet. Model building and change tracking for #30713 Fixes #25364 Fixes #25343 Part of #4179 Fixes #31722
ajcvickers
added a commit
that referenced
this issue
Apr 3, 2024
This change starts using the EF8 primitive collection infrastructure for primitive collections in Cosmos. This involves adding support for nested collections and read-only collections. The main challenge here is supporting all the different collection types when, for example, `List<List<string>>` cannot be cast to `IEnumerable<IEnumerable<string>>`. To support this, we use exact collection types in snapshots, and we use non-generic methods in the nested comparers and serializers. General dictionary mapping still not supported. No extensive query testing done yet. Model building and change tracking for #30713 Fixes #25364 Fixes #25343 Part of #4179 Fixes #31722
Related to #34026 |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
See https://github.com/npgsql/efcore.pg/blob/main/src/EFCore.PG/Storage/ValueConversion/INpgsqlArrayConverter.cs for a way of implementing this.
Also try to use built-in converters automatically, see https://github.com/npgsql/efcore.pg/blob/main/src/EFCore.PG/Storage/ValueConversion/NpgsqlValueConverterSelector.cs
The text was updated successfully, but these errors were encountered: