xorcyan
xorcyan
DTDrizzle Team
Created by xorcyan on 9/26/2024 in #help
db.insert doesn't immediately insert the values into the DB (Neon)
I am trying to insert some users and some organizations and then define membership relation between both of these. I have set a foreign key relation in the memberships table that references the id of orgs. Now, when I try to insert values in all three tables one after other I am not able to do it as it says the org id doesn't exist. When I do db.select statement just after db.insert, it results in an empty array. Is this the expected behavior? Why isn't db.insert promise resolving only after the data has been inserted? Thanks.
48 replies