Closed ThomasNucleus closed 6 years ago
Thank you for reporting this problem. The plugin, as inherited from the original author, just uses the LIKE operator for every field. It seems this fails in PostgreSQL. I see two solutions to this problem:
CAST(field AS TEXT)
)While the first option is more clean, the second option is probably what the user expects. Which is incremental search based on some digits in the number.
What do you think about it?
Thanks for heading me in the right direction.
I did something similar to 2. In DataTableComponent.php, _addCondition, I put the following at the top of the function:
$column = "{$column}::text";
It was a nice and easy fix for me to put in, not sure what you would want to do in the repo.
In devel branch, we now have a fix that uses '=' to compare numerical fields by default.
Whenever I use the search bar the ajax request bugs out, but only if I have fields/data that aren't strings. I've had these issues with timestamps and integers.
Example: Failed to load resource: the server responded with a status of 500 (Internal Server Error). https://puu.sh/toXol/18df2fd590.png
I'm also using a PostgreSQL database.
Am I missing something or is it an issue with using a PostgreSQL database?
Also sorting the columns causes no issues.