{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"closed","user":{"avatar_url":"https://secure.gravatar.com/avatar/a3047c3d62d8f8bd23521779bbccafc6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"a3047c3d62d8f8bd23521779bbccafc6","url":"https://api.github.com/users/zhil","login":"zhil","id":981783},"milestone":null,"assignee":null,"labels":[],"updated_at":"2011-11-08T14:46:16Z","closed_at":"2011-09-27T19:03:12Z","comments":4,"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/322","body":"One-to-many and many-to-one model works just great. But I cant do anything with many-to-many model\r\n\r\nI have an Entity \"video\", which can have a couple \"vendors\" attached to it.\r\n<pre>\r\n/**\r\n* Vendors for video\r\n*\r\n* @ORM\\ManyToMany(targetEntity=\"Vido\\AdminBundle\\Entity\\Vendor\")\r\n* @ORM\\JoinTable(name=\"videos_vendors\",\r\n* joinColumns={@ORM\\JoinColumn(name=\"video_id\", referencedColumnName=\"id\")},\r\n* inverseJoinColumns={@ORM\\JoinColumn(name=\"vendor_id\", referencedColumnName=\"id\")}\r\n* )\r\n*/\r\n    private $vendors;\r\n</pre>\r\nI am trying to configure createVideo form, so there will be section, where admin can select one or more vendors (with checkbox or multi-select or in any way).\r\nI am trying code like\r\n<pre>\r\n           ->with('Video.Vendors')\r\n                ->add('vendors', 'sonata_type_collection', array(), array(\r\n                'edit' => 'inline',\r\n                'inline' => 'table',\r\n                 ))\r\n            ->end()\r\n</pre>\r\nand got weird error\r\n<pre>INVALID MODE : 4e8212f079c3d_vendors - type : sonata_type_collection - mapping : 8 </pre>\r\n\r\nJust wonder - what does it mean?\r\n\r\nI have digged into sources and founded code <PRE>{{ block('sonata_admin_orm_many_to_many_widget') }}</pre>\r\nwhich means, that SonataAdminBundle do support Many-to-many model.\r\n\r\nCan anybody please give me any suggestions what could my error mean? (INVALID MODE : 4e8212f079c3d_vendors - type : sonata_type_collection - mapping : 8)\r\n\r\nAlso if anybody can share a couple snippets regarding how it can be implemented - it would be great :)","html_url":"https://github.com/sonata-project/SonataAdminBundle/issues/322","title":"Problem with \"Many-to-many\" model","number":322,"id":1754839,"created_at":"2011-09-27T18:21:22Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/59fbe0d0d97dc90759a0abc881fca606?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"59fbe0d0d97dc90759a0abc881fca606","url":"https://api.github.com/users/AHWEBDEV","login":"AHWEBDEV","id":1117971},"updated_at":"2011-11-08T14:46:16Z","url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/comments/2668216","body":"just a question, when using sonata_type_model, when i click to button \"+\" at the end of the field, it show me a dialog with the relation mapped form entity.\r\n\r\nWhen i save form, dialog will close.\r\n\r\nBut the new value is not inserted in the sonata_type_model field is that normal ?","id":2668216,"created_at":"2011-11-08T14:46:16Z"}}