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

Commit 759a094

Browse files
committed
Merge pull request #278 from kaza/master
solves issue with UpdateParam of columns with alias
2 parents fb6bf7f + 8d37a96 commit 759a094

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ServiceStack.OrmLite/OrmLiteDialectProviderBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,15 +684,15 @@ public virtual IDbCommand CreateParameterizedUpdateStatement(object objWithPrope
684684
{
685685
if (sqlFilter.Length > 0) sqlFilter.Append(" AND ");
686686

687-
sqlFilter.AppendFormat("{0} = {1}", GetQuotedColumnName(fieldDef.FieldName), String.Concat(ParamString, fieldDef.Name));
687+
sqlFilter.AppendFormat("{0} = {1}", GetQuotedColumnName(fieldDef.FieldName), String.Concat(ParamString, fieldDef.FieldName));
688688
AddParameterForFieldToCommand(command, fieldDef, objWithProperties);
689689

690690
continue;
691691
}
692692

693693
if (updateFields.Count > 0 && !updateFields.Contains(fieldDef.Name)) continue;
694694
if (sql.Length > 0) sql.Append(",");
695-
sql.AppendFormat("{0} = {1}", GetQuotedColumnName(fieldDef.FieldName), String.Concat(ParamString, fieldDef.Name));
695+
sql.AppendFormat("{0} = {1}", GetQuotedColumnName(fieldDef.FieldName), String.Concat(ParamString, fieldDef.FieldName));
696696

697697
AddParameterForFieldToCommand(command, fieldDef, objWithProperties);
698698
}

0 commit comments

Comments
 (0)