Set the proper protocol in the method client_id_from_model_id

When you are using a database with more than one protocol, is necessary to set the proper protocol in the method client_id_from_model_id. This was fixed with this commit.