-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
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
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
Apr 2, 2024
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
ajcvickers
removed
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
Aug 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in 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: