Skip to content

Instantly share code, notes, and snippets.

<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\ManyToOne;
use Doctrine\ORM\Mapping\OneToMany;
use Doctrine\ORM\Mapping\ManyToMany;
Symfony\Component\Debug\Exception\FatalThrowableError:
Type error: Argument 1 passed to Doctrine\Common\Collections\ArrayCollection::__construct() must be of the type array, object given, called in /home/seb/Projets/exercice1b/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 633
at vendor/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php:53
at Doctrine\Common\Collections\ArrayCollection->__construct(object(Orders))
(vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:633)
at Doctrine\ORM\UnitOfWork->computeChangeSet(object(ClassMetadata), object(Products))
(vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:479)
at Doctrine\ORM\UnitOfWork->computeScheduleInsertsChangeSets()
(vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:794)
### Keybase proof
I hereby claim:
* I am loquace on github.
* I am loquace (https://keybase.io/loquace) on keybase.
* I have a public key ASCWiuIey02bVFO3Hgswce5Jzfcy15SipxmLlMDdtbp_dQo
To claim this, I am signing this object: