[Bug]Phalcon\Mvc\Model::_postSaveRelatedRecords(): Call to method getmessages() on a non object in ... PollController.php
Using: $poll = new Poll(); $poll->name = $this->request->getPost("name", "string"); $poll->start_time = strtotime("2013-03-18"); $poll->end_time = strtotime("2013-03-20");
$options[0] = new Option(); //$options[0]->name = "Option 1";
$options[1] = new Option(); //$options[1]->name = "Option 2";
$poll->options = $options; $poll->save();
foreach($poll->getMessages() as $message){
echo $message,"
";
}
I get PhalconException: Phalcon\Mvc\Model::_postSaveRelatedRecords(): Call to method getmessages() on a non object in web/apps/frontend/controllers/PollController.php
Expected result is: name is required (option model)
This is fixed in the 1.0.0 branch, thanks