{"action":"closed","issue":{"url":"https://api.github.com/repos/fzaninotto/Faker/issues/576","repository_url":"https://api.github.com/repos/fzaninotto/Faker","labels_url":"https://api.github.com/repos/fzaninotto/Faker/issues/576/labels{/name}","comments_url":"https://api.github.com/repos/fzaninotto/Faker/issues/576/comments","events_url":"https://api.github.com/repos/fzaninotto/Faker/issues/576/events","html_url":"https://github.com/fzaninotto/Faker/issues/576","id":76222920,"number":576,"title":"Ideas for write a custom faker that works with Doctrine ArrayCollection","user":{"login":"reypm","id":627886,"avatar_url":"https://avatars.githubusercontent.com/u/627886?v=3","gravatar_id":"","url":"https://api.github.com/users/reypm","html_url":"https://github.com/reypm","followers_url":"https://api.github.com/users/reypm/followers","following_url":"https://api.github.com/users/reypm/following{/other_user}","gists_url":"https://api.github.com/users/reypm/gists{/gist_id}","starred_url":"https://api.github.com/users/reypm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reypm/subscriptions","organizations_url":"https://api.github.com/users/reypm/orgs","repos_url":"https://api.github.com/users/reypm/repos","events_url":"https://api.github.com/users/reypm/events{/privacy}","received_events_url":"https://api.github.com/users/reypm/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-14T04:14:02Z","updated_at":"2016-02-23T15:34:10Z","closed_at":"2016-02-23T15:34:10Z","body":"I have this piece of code in a entity:\r\n\r\n    class Email\r\n    {\r\n        /**\r\n         * @ORM\\ManyToMany(targetEntity=\"Media\", inversedBy=\"mediaXrefMail\", cascade={\"persist\", \"remove\"})\r\n         * @ORM\\JoinTable(name=\"emails_media_xref\",\r\n         *      joinColumns={@ORM\\JoinColumn(name=\"emails_id\", referencedColumnName=\"id\")},\r\n         *      inverseJoinColumns={@ORM\\JoinColumn(name=\"media_id\", referencedColumnName=\"id\")}\r\n         * )\r\n         */\r\n        protected $emailsMediaXref;\r\n\r\n        /**\r\n         * @ORM\\ManyToMany(targetEntity=\"Message\", inversedBy=\"messageXrefMail\", cascade={\"persist\", \"remove\"})\r\n         * @ORM\\JoinTable(name=\"emails_messages_xref\",\r\n         *      joinColumns={@ORM\\JoinColumn(name=\"emails_id\", referencedColumnName=\"id\")},\r\n         *      inverseJoinColumns={@ORM\\JoinColumn(name=\"messages_id\", referencedColumnName=\"id\")}\r\n         * )\r\n         */\r\n        protected $emailsMessageXref;\r\n\r\n        public function __construct()\r\n        {\r\n            $this->emailsMediaXref = new ArrayCollection();\r\n            $this->emailsMessageXref = new ArrayCollection();\r\n        }\r\n    }\r\n\r\nAny time I try to run fixtures using Nelmio/Alice I got this error:\r\n\r\n> [Symfony\\Component\\Debug\\Exception\\ContextErrorException] Catchable Fatal Error: Argument 1 passed to \r\n> Doctrine\\Common\\Collections\\ArrayCollection::__construct() must be of the type array, object given, \r\n> called in /var/www/html/reptooln_admin/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 555 and defined\r\n\r\nI need some ideas for write a small faker that cover the issue, can any help me here?"}}