Martin Pfeifer
New member
Hello,
I have created a notfeit table with a autogenerated feit_id.
Next I created a notpers table with an autogenerated pers_id and a feit_id wich is referenced as a foreign key to the tabel notfeit field feit_id.
De tabels are fully reference dependent.in a notfeit - notpers one to many relationship.
In Dadabik I have set permissions for the field feit_id (text alphanumeric) to No since the recordnumber is autogenerated bij postgres.
Further I referenced the field feit_id in a master detail setting referencing the table notpers field feit_id.
Existing relations are presented well in the dadabik master detail view.
However when I insert a new notpers record depending under the fact presenation i get the error message
[08] Error: during query execution. INSERT INTO "notpers" ("kenmerk", "rol", "perstype", "naam", "voornamen", "opmerking", "aanvulling", "details", " links") VALUES ('101', 'partij', '1', 'Piepleaar', NULL, NULL, NULL, NULL, NULL) RETURNING pers_id
The DBMS server said: SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "feit_id" of relation "notpers" violates not-null constraint DETAIL: Failing row contains (29, null, 101, partij, 1, Piepleaar, null, null, null, null, null).
The Null between 29 and 101 should have got the value 3 as that is de recordnumber of the referenced record in the table notfeit
What am I missing here?
I have created a notfeit table with a autogenerated feit_id.
Next I created a notpers table with an autogenerated pers_id and a feit_id wich is referenced as a foreign key to the tabel notfeit field feit_id.
De tabels are fully reference dependent.in a notfeit - notpers one to many relationship.
In Dadabik I have set permissions for the field feit_id (text alphanumeric) to No since the recordnumber is autogenerated bij postgres.
Further I referenced the field feit_id in a master detail setting referencing the table notpers field feit_id.
Existing relations are presented well in the dadabik master detail view.
However when I insert a new notpers record depending under the fact presenation i get the error message
[08] Error: during query execution. INSERT INTO "notpers" ("kenmerk", "rol", "perstype", "naam", "voornamen", "opmerking", "aanvulling", "details", " links") VALUES ('101', 'partij', '1', 'Piepleaar', NULL, NULL, NULL, NULL, NULL) RETURNING pers_id
The DBMS server said: SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "feit_id" of relation "notpers" violates not-null constraint DETAIL: Failing row contains (29, null, 101, partij, 1, Piepleaar, null, null, null, null, null).
The Null between 29 and 101 should have got the value 3 as that is de recordnumber of the referenced record in the table notfeit
What am I missing here?