I currently have a table:
namespace Models;
use Phalcon\Mvc\Model\Validator\Uniqueness;
/**
* User
*
* Represents a user
*
*/
class User extends \Phalcon\Mvc\Model {
/**
* @Primary
* @Identity
* @Column(type="integer", nullable=false)
*/
public $id;
/**
* @Column(type="string", length=70, nullable=false)
*/
public $username;
The problem is that the user table is inherited from another schema (foo) that I don't want the database user having access to and the underlying sequence is in foo. I have tried removing @Primary, @Identity. even all of the $id declaration and no matter what, I see a lastInsertId call :
PHP message: SQLSTATE[42501]: Insufficient privilege: 7 ERROR: permission denied for schema core
#0 [internal function]: PDO->lastInsertId(foo.user_id_se...')
#1 [internal function]: Phalcon\Db\Adapter\Pdo->lastInsertId('foo.user_id_se...')