Handle tags when variations change

This commit is contained in:
Stephan
2018-12-04 08:23:18 +01:00
parent 18c382d888
commit 5c140762c4
7 changed files with 393 additions and 23 deletions

View File

@@ -67,6 +67,24 @@ namespace Umbraco.Core.Persistence
/// <inheritdoc />
public ISqlContext SqlContext { get; }
#region Temp
// work around NPoco issue https://github.com/schotime/NPoco/issues/517 while we wait for the fix
public override DbCommand CreateCommand(DbConnection connection, CommandType commandType, string sql, params object[] args)
{
var command = base.CreateCommand(connection, commandType, sql, args);
if (!DatabaseType.IsSqlCe()) return command;
foreach (DbParameter parameter in command.Parameters)
if (parameter.Value == DBNull.Value)
parameter.DbType = DbType.String;
return command;
}
#endregion
#region Testing, Debugging and Troubleshooting
private bool _enableCount;
@@ -242,7 +260,9 @@ namespace Umbraco.Core.Persistence
sb.Append(" @");
sb.Append(i++);
sb.Append(":");
sb.Append(arg);
if (arg == DBNull.Value) sb.Append("<dbNull>");
else if (arg == null) sb.Append("<null>");
else sb.Append(arg);
}
return sb.ToString();