Skip to content

Commit 8f9b789

Browse files
committed
NH-3649 Missing support for round() in SQLite and SQL Server CE dialects (affected criteria queries)
1 parent 503fc2a commit 8f9b789

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/NHibernate/Dialect/MsSqlCeDialect.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ public MsSqlCeDialect()
6868

6969
RegisterFunction("concat", new VarArgsSQLFunction(NHibernateUtil.String, "(", "+", ")"));
7070

71+
RegisterFunction("round", new StandardSQLFunction("round"));
72+
7173
DefaultProperties[Environment.ConnectionDriver] = "NHibernate.Driver.SqlServerCeDriver";
7274
DefaultProperties[Environment.PrepareSql] = "false";
7375
}

src/NHibernate/Dialect/SQLiteDialect.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ protected virtual void RegisterFunctions()
8484
RegisterFunction("iif", new SQLFunctionTemplate(null, "case when ?1 then ?2 else ?3 end"));
8585

8686
RegisterFunction("cast", new SQLiteCastFunction());
87+
88+
RegisterFunction("round", new StandardSQLFunction("round"));
8789
}
8890

8991
protected virtual void RegisterKeywords()

0 commit comments

Comments
 (0)