Only attempt to define a primary_key on model based resources
Update missed test cases