phalcon / cphalcon

High performance, full-stack PHP framework delivered as a C extension.
https://phalcon.io
BSD 3-Clause "New" or "Revised" License
10.78k stars 1.96k forks source link

getConnectionService ignored in Phalcon\Mvc\Model #296

Closed roman-kulish closed 11 years ago

roman-kulish commented 11 years ago

In ext/mvc/model.c, line 416 you obtain connection service name by referring to Phalcon\Mvc\Model::_connectionService, which is OK, but if somebody overrides getConnectionService() method to return new connection service name it will have no effect.

It's better to call Phalcon\Mvc\Model::getConnectionService() instead and use result to retrieve connection pbject from DI.

phalcon commented 11 years ago

Thanks Roman, that was re-written in 0.8.0, to store the connection services in the models manager

nsossonko commented 9 years ago

This doesn't work again in 2