Automatic validation should validate primary key

fixes #143