Insert silently fails with missing table name?
Hi everyone!
I've been using Drizzle the past few days and so far it's been a breeze. However, I've ran into an issue today that I cannot seem to figure out.
I have a schema file that contains table definitions, like:
I am using RDS Data API with Drizzle. Created a repository service class for Clients and Accounts as well. I have the necessary functions such as getters, inserts, etc. For example, this is how a new client is inserted into the database:
This works perfectly, the client is inserted, all good. When I try to do the exact same thing with the "accounts" table however, the insert fails silently with 0 logs, 0 errors (callers are wrapped with try/catch), and as return value, I just get an empty object.
The "accounts" insert method:
Anyone has ever seen something like this?
1 Reply
I used the
getSQL()
function on the whole insert thing, and logged it. At the start I can see the
insert into
section, and below that all of the table's columns (so it's picking up the schema) but in the rest of the object, there's not a single instance of accounts
anywhere to be seen, and around the bottom I have a value: { " " }
right before the actual insert values for the columns.