Revert "Merge pull request #13276 from aayushkhandelwal11/change_to_key"

This will call primary_key two times

This reverts commit d0588a2e897d33c6c12e9fc5f8680328d37a26ca, reversing
changes made to 87e1e86640fb8b5a260ff7c0044aaae58fff2bc4.