Skip to content

Commit

Permalink
Correct non-NodaTime date/time type mappings when NodaTime is configu…
Browse files Browse the repository at this point in the history
…red (#3214)

Fixes #3213

(cherry picked from commit dba77fd)
  • Loading branch information
roji committed Jun 28, 2024
1 parent 8a4c25b commit aec0d1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public class NpgsqlDateTimeMemberTranslator : IMemberTranslator
public NpgsqlDateTimeMemberTranslator(IRelationalTypeMappingSource typeMappingSource, NpgsqlSqlExpressionFactory sqlExpressionFactory)
{
_typeMappingSource = typeMappingSource;
_timestampMapping = typeMappingSource.FindMapping("timestamp without time zone")!;
_timestampTzMapping = typeMappingSource.FindMapping("timestamp with time zone")!;
_timestampMapping = typeMappingSource.FindMapping(typeof(DateTime), "timestamp without time zone")!;
_timestampTzMapping = typeMappingSource.FindMapping(typeof(DateTime), "timestamp with time zone")!;
_sqlExpressionFactory = sqlExpressionFactory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ public NpgsqlDateTimeMethodTranslator(
{
_typeMappingSource = typeMappingSource;
_sqlExpressionFactory = sqlExpressionFactory;
_timestampMapping = typeMappingSource.FindMapping("timestamp without time zone")!;
_timestampTzMapping = typeMappingSource.FindMapping("timestamp with time zone")!;
_intervalMapping = typeMappingSource.FindMapping("interval")!;
_timestampMapping = typeMappingSource.FindMapping(typeof(DateTime), "timestamp without time zone")!;
_timestampTzMapping = typeMappingSource.FindMapping(typeof(DateTime), "timestamp with time zone")!;
_intervalMapping = typeMappingSource.FindMapping(typeof(TimeSpan), "interval")!;
_textMapping = typeMappingSource.FindMapping("text")!;
}

Expand Down

0 comments on commit aec0d1f

Please sign in to comment.