Support arbitrary primary key fields

Primary key fields are not always called `id`.
Merge pull request #113 from claymation/patch-1

Support arbitrary primary key fields