Allows user to specify primary key by name.

Fixes issue #179.