Allow a model not to have a primary key. Fixes #402