Well, there is no problem for me, because my app works fine. I noticed it by chance and I ask out of curiosity - it is a bug or not?
There is very standard configuration, so I paste only controller and model. (Phalcon V 1.1/nginx/php5.4)
<?php namespace Front\Controllers;
class TestController extends \Phalcon\Mvc\Controller
{
public function indexAction()
{
$record = new \Models\Records();
$record->module = 1;
$record->create();
$id = $record->id;
print_r($id);
exit();
}
}
<?php namespace Models;
class Records extends \Phalcon\Mvc\Model
{
public $id;
public $module;
public function getSource()
{
return 'records';
}
}
CREATE TABLE IF NOT EXISTS records
(id
int(10) unsigned NOT NULL AUTO_INCREMENT, module
tinyint(3) unsigned NOT NULL, PRIMARY KEY (id
), KEY module
(module
)) ENGINE=InnoDB AUTO_INCREMENT=1 ;