Fatal error: Call to a member function restore() on string in /volume1/web/testapp/packages/orm/classes/model/soft.php on line 238
238 model->restore($cascade_restore);
I don't really understand how the code works here...
Does anybody know an answer? :)
Greetings
Danny
class Person extends \Orm\Model_Soft
{
protected static $_has_one = array('User'=>array('key_from'=>'Id','model_to'=>'Model\\User','key_to'=>'PersonId','cascade_delete'=>true));
protected static $_soft_delete = array('deleted_field'=>'DeleteDate','mysql_timestamp'=>true);}
class User extends \Orm\Model_Soft
{
protected static $_soft_delete = array('deleted_field'=>'DeleteDate','mysql_timestamp'=>true);
}
962 throw new FrozenObject('No changes allowed.');
Code in soft.php looks like this now:
if (get_class($rel) != 'Orm\ManyMany')
{
$model_to = $rel->model_to;
$model_to::disable_filter();
$models = $rel->get($this);
is_array($models) or $models = array($models);
foreach ($models as $model)
{
$model->restore($cascade_restore);
}
$model_to::enable_filter();
}
It looks like you're new here. If you want to get involved, click one of these buttons!