I want to create a foreign key over two fields with the visual editor.
TabA: (idA, idB) <- idB is the primary key, (idA,idB) is unique
TabB: (id, idA, idB) <- id is primary key, (idA,idB) has an index not null
I can connect both tables in the visual editor. But when I set on the referential integrity, I get the error: "There is no unique index for the referenced field in the primary table" (translated from german).
Where is the problem?
Edit:
I finally found out that I was using the editor in the wrong way. My fault, that I start draging the fields from the wrong table. If I do right, everything works as expected.
I am not sure, if I will delete the question.