Wappler Version : W4 B9
Operating System : Mac M1
Server Model: NodeJS
Database Type: MySQL
Hosting Type: AWS Docker
What do you think should happen?
This may be by design but I feel that it is more of a bug…
When a DB query returns a field as null, the join should output the field as null
What actually happens?
Empty fields are returned as empty objects:
This is the result from the original query:
How to reproduce
- Detail a step by step guide to reproduce the issue
- A screenshot or short video indicating the problem
- A copy of your code would help. Include: JS, HTML.
- Test your steps on a clean page to see if you still have an issue
Create 2 database queries and join based on fields. Use a Set Value to output the result
The main problem is the formatters I normally use to detect presence or not of a value don’t work for objects so I am currently forced to workaround with
.keys().hasItems() as part of a ternary to apply a default value.
The fields present in the query that produce the empty objects are a mixture of numeric values (INT), datetime or strings of some description (usually VARCHAR) - it seems to not matter on the data type of the DB column.