SearchBuilderOptions()/SearchPaneOptions() generated invalid code on SqlServer
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Use the provided SearchBuilderOptions sample as the reproduction, then compare the generated SQL on SQLite and SQL Server, focusing on the SELECT and GROUP BY handling for the Label value. Done means the sample generates valid SQL on SQL Server while preserving its SQLite behavior; confirm whether the MAX(sites.name) workaround is the intended behavior.
Written by the indexing model from the issue text.
Description
Modify the sample to the following code
.Field(new Field("sites.name")
.SearchBuilderOptions(new SearchBuilderOptions()
.Value("sites.id")
.Label("sites.name")
.LeftJoin("sites", "sites.id", "=", "users.site")
)
)
This works on SQLite not SqlServer/MSSQL.
With SqlServer, you will get "Column '[sites].[name]' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause."
Finally, "fixing" this is:
.Field(new Field("sites.name")
.SearchBuilderOptions(new SearchBuilderOptions()
.Value("sites.id")
.Label("MAX(sites.name)")
.LeftJoin("sites", "sites.id", "=", "users.site")
)
)
Not sure if that is the appropriate fix though...
- Dominant language
- C#
- Stars
- 19
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DataTables/NET
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
DataTables/NET#27 · 1 comment ·
-
Async methods? Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
DataTables/NET#25 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
DataTables/NET#24 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
DataTables/NET#17 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
DataTables/NET#16 · 1 comment ·
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·