Fix table id_field for models with custom primary keys