You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect that it would use the connection service of the model that the query was built for.
Example:
let modelClass = builder->_models;
iftypeof modelClass =="array" {
let modelClass = array_values(modelClass)[0];
}
let model =new {modelClass}();
let dbService = model->getReadConnectionService();
let db = totalBuilder->getDI()->get(dbService);
Details
Phalcon version: (3.2.1)
PHP Version: (7.0.18)
Operating System: Ubuntu
Installation type: Installing via package manager
Server: Apache
The text was updated successfully, but these errors were encountered:
@dnapierata
I'm hope this fixed in the #12960 PR. Could you please create a small test which will cover code you have changed? Thank you for contributing.
Expected and Actual Behavior
When using the paginator querybuilder with a
HAVING
and with a model which uses a different db connection service. The paginator incorrectly assumes that the db service is'db'
when performing a count of the total records. https://github.com/phalcon/cphalcon/blob/3.2.x/phalcon/paginator/adapter/querybuilder.zep#L227I expect that it would use the connection service of the model that the query was built for.
Example:
Details
3.2.1
)7.0.18
)The text was updated successfully, but these errors were encountered: