Fixing problems related to working with model's pk-field, named other than "id"