New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exists ignore malformed arguments and runs anyway. Should throw BadExpressionException #316

hmobius opened this Issue Nov 11, 2013 · 0 comments


None yet
1 participant

hmobius commented Nov 11, 2013

Exists() can take a SimpleExpression argument to add a filter to its query. However, when the argument is a malformed SimpleExpression, Exists seems to ignore it and run as if it had no argument at all. For example,

var testOne = db.Albums.Exists(db.Albums.GenreId); // Just column name
var testTwo = db.Albums.Exists(1);  // No column names
var testThree = db.Albums.Exists(true);   // No column names

In all three cases, I would expect a BadExpressionException to be thrown. Instead, SimpleData checks for data in the Albums data and returns true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment