You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When updating a table with an array column, malformed sql is being created because the sourceType is passed in as the Array Element Type instead of the Array Type, but only when updating. When Inserting the proper type is being passed in in sourceType
public override Func<object, object> GetParameterConverter(DbCommand command, Type sourceType) {
if (sourceType == typeof(int[])) { //<-- this is int when updating should be int[] like when inserting.
return x => new NpgsqlParameter {
NpgsqlDbType = NpgsqlDbType.Array | NpgsqlDbType.Integer,
Value = (int[])x
};
}
See parameters 20 and 21 in the update. Sql is not valid.
Causes:
Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$22"
When updating a table with an array column, malformed sql is being created because the sourceType is passed in as the Array Element Type instead of the Array Type, but only when updating. When Inserting the proper type is being passed in in sourceType
See parameters 20 and 21 in the update. Sql is not valid.
Causes:
Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$22"
The text was updated successfully, but these errors were encountered: