-
Notifications
You must be signed in to change notification settings - Fork 874
Closed
Description
Hi All, following the upgrade to 2.1 queries with less than operators are failing in NH.
Here is a test to replicate (put this in CommandTests.cs)
[Test]
public void LessThanInQueryStringWithPrepare()
{
var command = new NpgsqlCommand("select count(*) from data where field_serial <:param1", Conn);
command.Parameters.AddWithValue(":param1", 1);
command.Prepare();
command.ExecuteScalar();
}
ERROR: 42601: syntax error at or near ":"
This is because 'param1' is not replaced before being sent to the server.
This test is a direct copy of 'GreaterThanInQueryStringWithPrepare' which is the same file, which passes successfully!
Alex.
Metadata
Metadata
Assignees
Labels
No labels