Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit a5cd168

Browse files
committed
Don't convert PartialSqlString's into params
1 parent aba6ba2 commit a5cd168

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/ServiceStack.OrmLite.SqlServerTests/Expressions/EqualityExpressionsTest.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ namespace ServiceStack.OrmLite.SqlServerTests.Expressions
44
{
55
public class EqualityExpressionsTest : ExpressionsTestBase
66
{
7-
#region int tests
8-
97
[Test]
108
public void Can_select_equals_constant_int_expression()
119
{
@@ -128,9 +126,6 @@ public void Can_select_not_equals_int_method_expression()
128126
CollectionAssert.DoesNotContain(actual, expected);
129127
}
130128

131-
#endregion
132-
133-
#region bool test
134129

135130
[Test]
136131
public void Can_select_equals_constant_bool_expression()
@@ -306,6 +301,5 @@ public void Can_select_equals_coalesce_on_the_right_expression()
306301
CollectionAssert.Contains(actual, expected); // this will fail as well
307302
}
308303

309-
#endregion
310304
}
311305
}

src/ServiceStack.OrmLite/Expressions/SqlExpression.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1364,7 +1364,10 @@ protected virtual void VisitFilter(string operand, object originalLeft, object o
13641364
if (operand == "AND" || operand == "OR" || operand == "is" || operand == "is not")
13651365
return;
13661366

1367-
ConvertToPlaceholderAndParameter(ref right);
1367+
if (!(right is PartialSqlString))
1368+
{
1369+
ConvertToPlaceholderAndParameter(ref right);
1370+
}
13681371
}
13691372

13701373
protected virtual void ConvertToPlaceholderAndParameter(ref object right)

0 commit comments

Comments
 (0)