mikependon / RepoDB

A hybrid ORM library for .NET.
Apache License 2.0
1.68k stars 122 forks source link

Bug: Retrieving `DateOnly` from reader is wrong #1150

Open xperiandri opened 1 year ago

xperiandri commented 1 year ago

Bug Description

Compiler gets method GetDateTime instead of GetFieldValue<DateOnly> https://github.com/mikependon/RepoDB/blob/8213ca425f2d3d4f83adc51bf507224c20206e82/RepoDb.Core/RepoDb/Reflection/Compiler/Compiler.cs#L446-L447

causing type mismatch exception here

https://github.com/mikependon/RepoDB/blob/8213ca425f2d3d4f83adc51bf507224c20206e82/RepoDb.Core/RepoDb/Reflection/Compiler/Compiler.cs#L656-L658

See https://github.com/npgsql/npgsql/blob/fcfafc138608b56a027bae7c121de4ddfccb5090/test/Npgsql.Tests/Types/DateTimeTests.cs#L108

Library Version:

RepoDb v1.13.1 and RepoDb.PostgeSQL v1.13.1 But built from the latest main