How to get reflection of DefaultSnippet from $defaultSnippets? Get
@var from annotation?
S pozdravem

Tomáš Votruba



776 778 332
http://tomasvotruba.cz


On 25 March 2014 15:53, Filip Procházka <notifications@github.com> wrote:
> In src/Kdyby/DoctrineForms/Controls/TextControl.php:
>
>> @@ -93,8 +94,13 @@ public function load(ClassMetadata $meta, Component
>> $component, $entity)
>>  		}
>>
>>  		if ($relation = $this->accessor->getValue($entity, $name)) {
>> -			$UoW = $this->em->getUnitOfWork();
>> -			$component->setValue($UoW->getSingleIdentifierValue($relation));
>> +			if (is_array($relation)) {
>> +				$component->setDefaultValue(array_keys($relation));
>
> If it's toMany relation you have to use reflection, you cannot rely on
> BaseEntity returning arrays for collections.
>
> —
> Reply to this email directly or view it on GitHub.