skipAttributesOnCreate work in 0.9.1 but not work in 1.0.0 and 1.1.0

Model::skipAttributesOnCreate work in 0.9.1 but not work in 1.0.0 and 1.1.0. Is it a bug?



84.4k

This is fixed in 1.1.0 beta 3 could you try with that version?

I've tried git checkout 1.1.0 install, and restart. The problem still exists. Beta 3 is in 1.1.0 branch right?



84.4k

I've tested and it's working:

class Robots extends Phalcon\Mvc\Model
{

        public function initialize()
        {
                $this->skipAttributesOnCreate(array('name'));
        }
}
$robot = new Robots();
$robot->name = 'hello';
$robot->type = 'some';
$robot->year = 1011;
var_dump($robot->save());
SELECT IF(COUNT(*)>0, 1 , 0) FROM `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_NAME`='robots'
DESCRIBE `robots`
INSERT INTO `robots` (`type`, `year`) VALUES (?, ?) [some, 1011]
bool(true)


30.7k

it works with a single attribute in the array declaration, but not if you use something like : $this->skipAttributesOnCreate(array('firstName','lastName'));

Forget it, it works with 1.1.0 !!!

OK Confirm It work in the latest 1.1.0