未验证 提交 36522183 编写于 作者: S Shay Rojansky 提交者: GitHub

Fix NodaTime Date translation for legacy timestamp mode (#2708)

Fixes #2707
上级 9f58e186
......@@ -336,7 +336,7 @@ SqlExpression Upper()
// PG allows converting a timestamp directly to date, truncating the time; but given a timestamptz, it performs a time zone
// conversion (based on TimeZone), which we don't want (so avoid translating except on timestamp).
// The translation for ZonedDateTime.Date converts to timestamp before ending up here.
case "Date" when instance.TypeMapping is TimestampLocalDateTimeMapping:
case "Date" when instance.TypeMapping is TimestampLocalDateTimeMapping or LegacyTimestampInstantMapping:
return _sqlExpressionFactory.Convert(instance, typeof(LocalDate), _typeMappingSource.FindMapping(typeof(LocalDate))!);
case "TimeOfDay":
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册