Re-enable DateOnly/TimeOnly support, fixing the defects that got it disabled - #2228
Merged
Conversation
…isabled DateOnly/TimeOnly support (#2051) was compiled out in 907a4d9 pending #2071/#2072. This re-enables it with the root causes fixed, and teaches the read paths that the date/time family has no IConvertible bridge - which box a date or time column yields is a provider/version decision (Npgsql 10: DateOnly/TimeOnly; SqlClient and Npgsql 9: DateTime/TimeSpan), so both shapes must convert: - GetFieldValue<T> is no longer demanded of a column whose reported type needs a family conversion (a datetime column into a DateOnly member was the #2072 breakage; SqlDecimal-style entries, where GetFieldValue from a differently-reported column is the whole point, keep it); - the member, scalar and Parse<T> paths all convert DateOnly/TimeOnly <-> DateTime/TimeSpan in both directions (IL for members, object-level elsewhere), fixing reads against Npgsql 10 date/time columns (#2226); - Query<DateOnly>/<TimeOnly> in scalar form no longer silently return default(T) (#2227): the typeMap entries make them simple types again; - the same-TypeCode direct-unbox shortcut is restricted to distinct codes: TypeCode.Object matching TypeCode.Object says nothing (TimeSpan into TimeOnly? threw), while object on either side (sql_variant columns, dynamic members) keeps the direct unbox; - the scalar conversion fallback keeps Convert.ChangeType's strict null contract (TestConversionExceptionMessages pins it). The parked DateTimeOnlyTests are re-enabled, with new tests for the #2072 shape (datetime column into DateOnly member), the #2227 scalar shape, and date-as-DateTime regression guards; PostgresqlTests gains the Npgsql-10 interchange matrix ([FactPostgresql], so it runs where the documented container is available). Fixes #2072, #2226, #2227, #1728; expected to also resolve #2071.
|
Thank you! |
This was referenced Sep 12, 2026
This was referenced Sep 14, 2026
Open
github-actions Bot
pushed a commit
to sloweyyy/cloud-native-ecommerce-platform
that referenced
this pull request
Sep 14, 2026
Updated [Dapper](https://github.com/DapperLib/Dapper) from 2.1.79 to 2.1.86. <details> <summary>Release notes</summary> _Sourced from [Dapper's releases](https://github.com/DapperLib/Dapper/releases)._ ## 2.1.86 ## What's Changed * Point docs links at dapperlib.dev by @mgravell in DapperLib/Dapper#2222 * Point PackageReleaseNotes at GitHub Releases by @mgravell in DapperLib/Dapper#2223 * Pin the docs site config, and give it a favicon by @mgravell in DapperLib/Dapper#2224 * DynamicParameters.AddParameters(IDbCommand): identity-free self-apply by @mgravell in DapperLib/Dapper#2225 * Re-enable DateOnly/TimeOnly support, fixing the defects that got it disabled by @mgravell in DapperLib/Dapper#2228 * Publish to nuget.org via Trusted Publishing (OIDC), and retire MyGet/AppVeyor by @mgravell in DapperLib/Dapper#2230 **Full Changelog**: DapperLib/Dapper@2.1.79...2.1.86 Commits viewable in [compare view](DapperLib/Dapper@2.1.79...2.1.86). </details> Updated [Microsoft.Extensions.Configuration.Abstractions](https://github.com/dotnet/dotnet) from 10.0.11 to 10.0.12. <details> <summary>Release notes</summary> _Sourced from [Microsoft.Extensions.Configuration.Abstractions's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.Extensions.Configuration.Binder](https://github.com/dotnet/dotnet) from 10.0.11 to 10.0.12. <details> <summary>Release notes</summary> _Sourced from [Microsoft.Extensions.Configuration.Binder's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.Extensions.DependencyInjection.Abstractions](https://github.com/dotnet/dotnet) from 10.0.11 to 10.0.12. <details> <summary>Release notes</summary> _Sourced from [Microsoft.Extensions.DependencyInjection.Abstractions's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.Extensions.Hosting.Abstractions](https://github.com/dotnet/dotnet) from 10.0.11 to 10.0.12. <details> <summary>Release notes</summary> _Sourced from [Microsoft.Extensions.Hosting.Abstractions's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.Extensions.Logging.Abstractions](https://github.com/dotnet/dotnet) from 10.0.11 to 10.0.12. <details> <summary>Release notes</summary> _Sourced from [Microsoft.Extensions.Logging.Abstractions's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [MongoDB.Driver](https://github.com/mongodb/mongo-csharp-driver) from 3.11.1 to 3.11.2. <details> <summary>Release notes</summary> _Sourced from [MongoDB.Driver's releases](https://github.com/mongodb/mongo-csharp-driver/releases)._ ## 3.11.2 > [!IMPORTANT] > This is a security patch release. It addresses two CVEs reported against the driver, along with a small number of related fixes. There are no public API changes and no application code changes are required to upgrade. Note that the shape of some queries generated by the LINQ provider and by GridFS has changed — see the individual tickets below. This is a patch release that contains fixes and stability improvements: - [CSHARP-6177](https://jira.mongodb.org/browse/CSHARP-6177) / [CVE-2026-88026](https://www.cve.org/CVERecord?id=CVE-2026-88026): Query filter regex injection via unescaped backslash and bracket in LINQ character-set translation - [CSHARP-6190](https://jira.mongodb.org/browse/CSHARP-6190) / [CVE-2026-88025](https://www.cve.org/CVERecord?id=CVE-2026-88025): Use exact match for file ID in GridFS delete methods - [CSHARP-6213](https://jira.mongodb.org/browse/CSHARP-6213): Normalize SRV target host names to lower case during SRV polling The full list of issues resolved in this release is available at [CSHARP JIRA project](https://jira.mongodb.org/issues/?jql=project%20%3D%20CSHARP%20AND%20fixVersion%20%3D%203.11.2%20ORDER%20BY%20key%20ASC). Documentation on the .NET driver can be found [here](https://www.mongodb.com/docs/drivers/csharp/v3.11/). Commits viewable in [compare view](mongodb/mongo-csharp-driver@v3.11.1...v3.11.2). </details> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This was referenced Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DateOnly/TimeOnly support (#2051) was compiled out in 907a4d9 pending #2071/#2072. This re-enables it with the root causes fixed, and teaches the read paths that the date/time family has no
IConvertiblebridge — which box adate/timecolumn yields is a provider/version decision (Npgsql 10:DateOnly/TimeOnly; SqlClient and Npgsql 9:DateTime/TimeSpan), so both shapes must convert:GetFieldValue<T>is no longer demanded of a column whose reported type needs a family conversion — adatetimecolumn into aDateOnlymember was the DateOnly "off by one" column error #2072 breakage.SqlDecimal-style entries, whereGetFieldValuefrom a differently-reported column is the whole point, keep it.Parse<T>paths all convertDateOnly/TimeOnly↔DateTime/TimeSpanin both directions, fixing reads against Npgsql 10 date/time columns (DateOnly/DateTime coercion gaps on 'date' columns (breaks with Npgsql 10, and SqlClient the other way) #2226).Query<DateOnly>/<TimeOnly>in scalar form no longer silently returndefault(T)(Query<DateOnly> / Query<TimeOnly> (scalar form) silently return default(T) #2227).TypeCodedirect-unbox shortcut now requires distinct codes:TypeCode.ObjectmatchingTypeCode.Objectsays nothing (TimeSpanintoTimeOnly?threw), while object on either side —sql_variantcolumns,dynamicmembers — keeps the direct unbox.Convert.ChangeType's strict null contract (TestConversionExceptionMessagespins it).Verified with a 13-probe matrix across SqlClient and both Npgsql 9.0.2/10.0.2 (all green, both directions, nullable included, plus the exact #2072 repro shape), and the full test suite passes on net10/net8/net481 against local SQL Server + the documented Postgres container. The parked
DateTimeOnlyTestsare re-enabled with new tests for the #2072 and #2227 shapes and date-as-DateTime regression guards;PostgresqlTestsgains the Npgsql-10 interchange matrix.Fixes #2072, #2226, #2227, #1728; expected to also resolve #2071 (same family — would appreciate confirmation from that repro).