I want to set all the models to useDynamicUpdate. I didn't find the global setting in model Features.
class BaseModel extends Phalcon\MVC\Model {
public function initialize()
{
$this->useDynamicUpdate(true);
}
}
// next model
Class MyFirstmodel extends **BaseModel** {
public function initialize()
{
parent::initialize();
}
//bla bla bla
}
// and so on and so on
And is there any method like useDynamicCreate()
this one i dont understand. Lets say we have a table with 3 fields -> id ( int AI ), name ( varchar 255, default null ), deleted ( bool) default false )
if you do
$rec = new \MyTableModel();
$rec->name = 'koko';
the insert would be:
1 | koko | false
so.. it will write values you defined, but it would also respect how you sctuctured your databases