Php 在数据库symfony2中保留多对多关系

Php 在数据库symfony2中保留多对多关系,php,symfony,orm,doctrine,Php,Symfony,Orm,Doctrine,从窗体持久化实体时,在数据库中刷新时出现以下错误: Catchable Fatal Error: Argument 1 passed to Doctrine\Common\Collections\ArrayCollection::__construct() must be an array, object given, called in C:\wamp\www\Symfony\vendor\doctrine\orm\lib\Doctrine\ORM\UnitOfWork.php on line

从窗体持久化实体时,在数据库中刷新时出现以下错误:

Catchable Fatal Error: Argument 1 passed to Doctrine\Common\Collections\ArrayCollection::__construct() must be an array, object given, called in C:\wamp\www\Symfony\vendor\doctrine\orm\lib\Doctrine\ORM\UnitOfWork.php on line 519 and defined in C:\wamp\www\Symfony\vendor\doctrine\common\lib\Doctrine\Common\Collections\ArrayCollection.php line 48 
我想我得到的是对象形式,但它必须是数组集合形式 我不明白


任何想法都可能是绑定错误或实体类配置错误。但是如果没有您提供的更多代码,我们就无法真正猜出哪里出了问题:)