I am trying to relate SonataMediaBundle to another Entity: Products with a relation ManyToMany.
The schema and relation are well created.
Howev
You need to rely on MediaBundle Gallery. In your entity you something like :
/**
* @ORM\ManyToOne(targetEntity="Application\Sonata\MediaBundle\Entity\Gallery")
* @ORM\JoinColumn(name="image", referencedColumnName="id")
*/
private $images;
And then in your form, you'll be able to link a Gallery to your object with something like :
->add('images', 'sonata_type_model_list', array('required' => false), array('link_parameters' => array('context' => $context)))