added ability to change primary key of relatiion