What do you think should happen?
I would expect to be able to use the identity value which gets returned from an INSERT call
Actual behavior
What actually happens?
When I try to use the identity of the newly added record in a follow on command I get the following message:
message: "select * from "a_demandrail" where "a_demandrail"."id" = $1 limit $2 - invalid input syntax for type integer: "INSERT""
I've searched the forum and found the below entry. I'm using exactly the same configuration: nodejs & postgresql.
How to reproduce
The attached screenshot shows my failing API Action.
@patrick Just encountered this bug with NodeJS & Postgres.
The column in question is of type UUID in our case.
Adding the returning key-value pair manually in the JSON returns the inserted row’s identity - otherwise it returns “INSERT”.
On Wappler 5.8.2.
There are other older SAs with insert queries which have this setup running correctly - but it seems to have broken in some version after that.
We tried creating a new SA with just the insert query, and it fails.
The DB manager shows the field’s data type as UUID correctly as well.
Please help.