Getting foreign key error even though foreign row exists
I have two tables connected by a foreign key constraint. My
I have DBeaver open and can see that there is a row in the
Thing is, not only does the
foo table has a foo_uuid column, and my bar table references it via a foo_uuid column. I am trying to call this method:I have DBeaver open and can see that there is a row in the
foo table with foo_uuid = 123, but when I run the create method I get an error: "Foreign key constraint violated". It has code P2003 and says the error is on the foo_uuid foreign key constraint.Thing is, not only does the
foo exist, but I can also insert this row into bar using DBeaver without any errors. What's going on? Is there some additional argument that's needed for the create call when a foreign key exists?