-
Notifications
You must be signed in to change notification settings - Fork 127
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
Bug: QueryAsync with empty QueryField list throws SQL exception #498
Comments
Thanks for this and it is acknowledge. I will do fix this. It is actually working if you're to use the 'whereOrPrimaryKey' passing the nulls. var data = await connection.QueryAsync<SettingTagDbo>(whereOrPrimaryKey: null); You are correct, it should behave like |
I hope you are not block by this for now. Thanks |
No rush, the workaround is simple :) |
The fix is simple as well, see here. Instead of 'null-checks', we can do the 'presence-check' like EDIT: The fix seems to be checking of the |
…f Enumerable.Empty<QueryGroup>(). #498
Closing this ticket now. Kindly let us know if you have any questions. Thanks! |
Currently using
RepoDb.SqlServer
1.0.13
The code
db.QueryAsync<SettingTagDbo>(Enumerable.Empty<QueryField>())
generates the following invalid SQLSELECT [SettingDefinitionSet], [SettingCollection], [SettingCollectionValue], [ResourceType], [ResourceId], [Path], [SettingType], [TagType], [Value] FROM [SettingTag] WHERE () ;
I would expect
QueryAsync
with an empty QueryField list to be equivalent toQueryAllAsync
This appears to be a similar yet different error than in #463
Current workaround is similar, call
QueryAllAsync
orQueryAsync
depending on whether QueryField list is emptyThe text was updated successfully, but these errors were encountered: