Sonata Admin One to Many relations
<p>I started working with SonataAdmin Bundle today, and i can't figure out OneToMany relations. My User can follow(obserwowane) offerts</p>

<p>Entities:</p>

<pre><code>class Obserwowane {

  /**
   * @ORM\Id
   * @ORM\Column(type="integer")
   * @ORM\GeneratedValue(strategy="AUTO")
   */
  protected $id;

  /**
   * @ORM\ManyToOne(targetEntity="Oferty",inversedBy="obserwowane")
   * @ORM\JoinColumn(name="oferta", referencedColumnName="id_oferty", onDelete="CASCADE")
   */
  protected $oferta;

  /**
   *
   * @ORM\ManyToOne(targetEntity="User", inversedBy="obserwowane")
   * @ORM\JoinColumn(name="user", referencedColumnName="id")
   */
  protected $user;
}  
</code></pre>

<p>.</p>

<pre><code>class User {

  /**
   * @ORM\OneToMany(targetEntity="Obserwowane", mappedBy="user")
   */
  public $obserwowane;
}
</code></pre>

<p>.</p>

<pre><code>class Oferty {

  /**
   * @ORM\OneToMany(targetEntity="Obserwowane", mappedBy="oferta")
   */
  protected $obserwowane;
}
</code></pre>

<p>My servies.yml -> <a href="http://pastebin.com/biNCLhNt" rel="nofollow">http://pastebin.com/biNCLhNt</a></p>

<p>I would like to display followed offers in User form in SonataAdminBundle. I would like also to have it editable. </p>

<pre><code>protected function configureFormFields(FormMapper $formMapper)
{
    $formMapper
        -&gt;add('id', 'integer', array('label' =&gt; 'id'))
        -&gt;add('username', 'text', array('label' =&gt; 'Username'))
        -&gt;add('email', 'text', array('label' =&gt; 'e-mail'))
        -&gt;add('password', 'text', array('label' =&gt; 'Password'))
    ;
}
</code></pre>