How to Begin a transaction inside a model with a Database set in the DI with the phalcon bootstrap

I'm trying to do $this->db->begin(); But anyway I try I get or undefined function or No active transaction errors.

Just use the service associated to the model:

$di = \Phalcon\Di::getDefault();


edited May '15

It gives me There is no active transaction, i just have between begin and commit 3 lines of this->getModelsManager()->executeQuery("INSERT INTO ....");

The servicename if im not wrong is "db":

$di->set('db', function () use ($config) {
return new DbAdapter(array(
        'host' => $config->database->host,
        'username' => $config->database->username,
        'password' => $config->database->password,
        'dbname' => $config->database->dbname,
        'charset' => $config->database->charset,