I'm persisting a field of type ArrayCollection to a MySQL database which contains only stings. The database field is of type "array" in the ORM definition and of type TEXT in the database.
/**
 * @var ArrayCollection
 *
 * @ORM\Column(name="currencies", type="array")
 */
private $currencies;
When persisted it looks like this in the database:
O:43:"Doctrine\Common\Collections\ArrayCollection":1:{s:54:"Doctrine\Common\Collections\ArrayCollection_elements";a:3:{i:0;s:3:"EUR";i:1;s:3:"USD";i:2;s:3:"GBP";}}
Is there a way to get something more close to a json array into the database? Something like this:
['EUR', 'USD', 'GBP']
 
     
     
    