I have the parent table "persona"(people), which child tables "clients" and "treballadors"(workers) inherit from. I inserted one row in each child table.
I also have a table, "passis"(cards), which is related with "persona" 1-1. Not all persons have a card, but all cards belong to a person, so the cards table receives the foreign key.
However, when I try to insert a row into the table, the following foreign key-related error triggers:
As you can see, a record in table persona with id=2 is actually present. Why then the error?