title: Argument 1 passed to Doctrine\Common\Collections\ArrayCollection::__construct() must be of the type array, object given,
body: <p>I have following Entity Class</p>
  
  <pre><code>&lt;?php
  namespace EvolisClientRequest\Model\Entities;
  
  use Doctrine\ORM\Mapping as ORM;
  
  /**
   * @ORM\Entity
   */
  class Email
  {
      /**
       * @var \Ramsey\Uuid\Uuid
       * @ORM\Id
       * @ORM\Column(type="uuid")
       * @ORM\GeneratedValue(strategy="CUSTOM")
       * @ORM\CustomIdGenerator(class="Ramsey\Uuid\Doctrine\UuidGenerator")
       */
      protected $id;
  
      /**
       * @ORM\Column(type="string")
       * @var string
       */
      private $sender;
  
      /**
       * @ORM\Column(type="string")
       * @var string
       */
      private $subject;
  
      /**
       * @ORM\Column(type="string")
       * @var string
       */
      private $body;
  
      /**
       * @ORM\ManyToMany(targetEntity="Request", mappedBy="Email")
       * @var Request
       */
  
      private $request;
  
      public function __construct(string $sender, string $subject, string $body,Request $request)
      {
          $this-&gt;sender = $expeditor;
          $this-&gt;subject = $subject;
          $this-&gt;body = $body;
          $this-&gt;request = $request;
      }
  
  }
  </code></pre>
  
  <p>On doing following it gives error:</p>
  
  <pre><code>$email = $this-&gt;email_dao-&gt;create ('srjfjgn@rkgjb.com','fkj','sdfkdjhbf',  new \Doctrine\Common\Collections\ArrayCollection($request_dao));
  </code></pre>
  
  <p>The line on which give error is:</p>
  
  <pre><code>$email = $this-&gt;email_dao-&gt;create ('srjfjgn@rkgjb.com','fkj','sdfkdjhbf',  new \Doctrine\Common\Collections\ArrayCollection($request_dao));
  </code></pre>