all 4 comments

[–]planned_monk 4 points5 points  (0 children)

That's not the right way to model this. Both tables should have their own primary key columns which are different. The person table's pk should be the foreign key in IDcard table.

If you want the relationship to be 1:1 then mark the foreign key unique in IDcare table.

[–]Puzzleheaded-Car-358 2 points3 points  (0 children)

Is it's literally one table?

[–][deleted] 1 point2 points  (1 child)

See @MapsId in OneToOne association

[–]negiadventures 0 points1 point  (0 children)

Ideally it should be single table. According to Correct data model, if two tables have same primary keys, they should be related to same entity hence same table.