Class1’s id should be the foreign key and also the primary key of Class2 . How to set up this relationship ?
I do know , this is a basic question . But I am a bit confused as to how to go about it . Class1 has a One to One relationhip with Class2 , Class3 and henceforth . So should that also be mentioned in the model of Class2 ?
The way to have the PK of
Class1be both the PK and FK ofClass2is forClass2to derive fromClass1(class Class2(Class1):). But this has other implications, and you need to sit down and decide if this is really what you want.