Searchpanes problem when using Editor Libraries on DotNet 7
Searchpanes problem when using Editor Libraries on DotNet 7
parcival
Posts: 28Questions: 8Answers: 0
in SearchPanes
When I try to use SearchPanes with the Editor Library, I get some weird errors on the API. I have tried to implement the SearchPanes example, but the API generates this error when using a SqlLocalDB:
An unhandled exception occurred while processing the request.
InvalidCastException: Unable to cast object of type 'System.Int32' to type 'System.Nullable`1[System.Int64]'.
DataTables.SearchPaneOptions.Exec(Field fieldIn, Editor editor, List<LeftJoin> leftJoinIn, DtRequest http, Field[] fields)
I made a GitHub repo with the demo code with my modifications for running in Minimal API, with the specific endpoint here
This question has an accepted answers - jump to answer
Answers
For clarification, the code that's failing is below, and the line that's reported with the error is
var response = new Editor(db, "users")
Are you using the same client-side code from that example and also the same database data?
Edit I'm just wondering how I can reproduce the error.
Allan
Yes, this is the same code from the example and same data. I came across this in my app and tried to go back to basics in case I was doing something weird somewhere
You can clone my example project from https://github.com/gotmoo/MinimalDatatablesEditor and load the sample data from https://editor.datatables.net/manual/net/core#Examples-SQL, or the same thing happens when you load contents of the Editor-NETCore-2.1.2.zip and set the framework version to 7, same sample data.
Got it . Thanks so much for the test case. I've committed the fix and I'll do a release of Editor early next week with the patch.
Allan
Fantastic news, Allan! Super fast response as always
I'll check on the update next week!