fixes #143: automatic validation should validate primary key