Skip to content

Bug: QueryAsync with empty QueryField list throws SQL exception #498

@asleire

Description

@asleire

Currently using RepoDb.SqlServer 1.0.13

The code db.QueryAsync<SettingTagDbo>(Enumerable.Empty<QueryField>()) generates the following invalid SQL
SELECT [SettingDefinitionSet], [SettingCollection], [SettingCollectionValue], [ResourceType], [ResourceId], [Path], [SettingType], [TagType], [Value] FROM [SettingTag] WHERE () ;

I would expect QueryAsync with an empty QueryField list to be equivalent to QueryAllAsync

This appears to be a similar yet different error than in #463

Current workaround is similar, call QueryAllAsync or QueryAsync depending on whether QueryField list is empty

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdeployedFeature or bug is deployed at the current releasefixedThe bug, issue, incident has been fixed.requestA request from the community.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions