Wappler Version : 3.7.8
Operating System : Windows 10
Server Model: PHP
Database Type: MySQL
Hosting Type: custom
Expected behavior
Using Query Builder it should be possible to compare a TinyInt column to 1 (as it always has been)
What actually happens?
Having entered a ‘1’ in the relevant field, the value is changed to ‘true’, eg:
WHERE tinyint_col = 1
to
WHERE tinyint_col = true
… and the query fails.
How to reproduce
Enter a ‘1’ and leave the field. Look at the query preview at the bottom of Query Builder window: ‘true’ has replaced the ‘1’.
This has always worked in the past. It seems now that Wappler assumes that a Tinyint is being used as a boolean value (which might be true), but doesn’t allow comparing its value to 1. Existing queries work, but it’s not possible to create new queries with such fields.
Workarounds:
- Custom queries work fine
- Storing ‘1’ in a variable and using that for the expression:
- Editing API file in editor