Allow for primary_key to be passed as an option

We had a need to use an alternate key for lookups so we add an option that allows you to specify primary_key for database lookups.