Implemented compound foreign key for has one relationships