Presuming the id is unique in parent and child, what’s the value of the type field in the foreign key? Are you saying the PK on tableMain is (type,id), perhaps for clustering purposes?
Preventing the parent record from saying "tblOne" while the actual ID value is present on "tblTwo".