Fix patching model with a specified primary key.

When a model has more than one primary key and the alternative primary key is specified in `create_api`, `patch` was unable to find the row because the `primary_key` is not passed to `query_by_primary_key`.
Remove print statements.