I have a list of type, and I have an error prompt "must be an instance of 'parentType' an array given,' not the 'type' desired because I have this : 'myFieldOnMyAssociated' => array(array('_type' =>'myapp_mybundle_mytype")) or the type that I want...
Where can I choose the good "type" child of "types" ?
This is my log
at MyParentClass ->setMyFieldOnMyAssociated (array(object(InitiativeDeclarant)))
in vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php at line 410
The only thing I do is to get this array on my accesseur set and take the only one child I want like this :
public function setMyFieldOnMyAssociated(array $arrayOfTypes)
{
//I take the first type
$this->reponse = $reponse[0];
return $this;
}
Hey,
I have a list of type, and I have an error prompt "must be an instance of 'parentType' an array given,' not the 'type' desired because I have this : 'myFieldOnMyAssociated' => array(array('_type' =>'myapp_mybundle_mytype")) or the type that I want...
Where can I choose the good "type" child of "types" ?
This is my log
The only thing I do is to get this array on my accesseur set and take the only one child I want like this :
Thank you ! :)