What steps will reproduce the problem?
Delete<MyType>(null);
This generates the following SQL (using the attached file):
delete from adavetest2 where ADaveTestId = @ADaveTestId
The parameter is not populated as null is passed. In postgresql "@" is the
unary absolute operator, so this query deletes everything with id >= 0.
What is the expected output? What do you see instead?
An error of some sort.
There are two ways we could solve this:
Have .Delete<>() throw an exception when passed null. (This sounds like a good
way to me)
Or change the parameters to use : instead of @, this will then generate an
error at the database server end as : is not a valid operator.
I'll do a github pull request with the first fix momentarily.
Original issue reported on code.google.com by elite.da...@gmail.com on 22 Mar 2012 at 10:41
Original issue reported on code.google.com by
elite.da...@gmail.com
on 22 Mar 2012 at 10:41Attachments: