fixed issue with pk name
added test for id or pk