Closed insekticid closed 8 years ago
/** * @property Item $item {m:1 ItemsRepository} * @property Type $type {virtual} */ class Log extends Entity { public function getterType() { return $this->item->type; } }
$row is Nextras Orm Entity
$form = new \Nette\Forms\Container; $form->addSelect('type'); $form->setDefaults($row->toArray());
default value for select named 'type' is empty because of skipping virtual properties
Yes, this seems to be u bug because in history this method was used for persistance.
I have implemented this, but I think for setting form defaults you should use a different aproach, some more specific maybe.
$row is Nextras Orm Entity
default value for select named 'type' is empty because of skipping virtual properties