Skip to content

Commit

Permalink
Minimal fix for the datetime case
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericDelaporte committed Jun 10, 2024
1 parent edc4177 commit 77fe3e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/NHibernate/Type/AbstractDateTimeType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public override object FromStringValue(string xml)
public override object DefaultValue => BaseDateValue;

/// <inheritdoc />
public override string ObjectToSQLString(object value, Dialect.Dialect dialect) =>
"'" + (DateTime) value + "'";
public override string ObjectToSQLString(object value, Dialect.Dialect dialect)
=> dialect.ToStringLiteral(((DateTime) value).ToString(), SqlTypeFactory.GetAnsiString(50));
}
}

0 comments on commit 77fe3e5

Please sign in to comment.