I have an Entity
that has a array field like this:
...
/**
* @var array
*
* @ORM\Column(name="tels", type="json_array")
*/
private $tels;
...
I fill this using form and it fills correctly as after submit var_dump($entity->getTels())
returns this:
object(Doctrine\Common\Collections\ArrayCollection)[448]
private '_elements' =>
array (size=1)
0 => string '123' (length=3)
But after persist doctrine ignores this fields value and stores empty array:
+----+------+
| id | tels |
+----+------+
| 1 | {} |
+----+------+
What is the problem?