title: Symfony / API Platform - Many To Many relationship only working in one way
body: <p>i'm working on a project where i need to associate &quot;Articles&quot; and &quot;Addresses&quot; entities to an &quot;FAQ&quot; entity. So i wrote those two relations in my Faq entity</p>
  <pre><code>/**
   * @ORM\ManyToMany(targetEntity=Article::class, inversedBy=&quot;faqs&quot;)
   * @Groups({&quot;api_backend&quot;})
   * @MaxDepth(1)
   */
  private $article;
  
  /**
   * @ORM\ManyToMany(targetEntity=Adresse::class, inversedBy=&quot;faqs&quot;)
   * @Groups({&quot;api_backend&quot;})
   * @MaxDepth(1)
   */
  private $address;
  </code></pre>
  <p>and add these properties in my Adresse.php</p>
  <pre><code>/**
   * @ORM\ManyToMany(targetEntity=Faq::class, mappedBy=&quot;address&quot;)
   * @Groups({&quot;api_backend&quot;})
   * @MaxDepth(1)
   */
  private $faqs;
  </code></pre>
  <p>and Article.php</p>
  <pre><code>/**
   * @ORM\ManyToMany(targetEntity=Faq::class, mappedBy=&quot;article&quot;)
   * @Groups({&quot;api_backend&quot;})
   * @MaxDepth(1)
   */
  private $faqs;
  </code></pre>
  <p>When i try to add an article to one of my faqs it works great</p>
  <p><a href="https://i.stack.imgur.com/eoQLH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eoQLH.png" alt="Postman Request" /></a></p>
  <pre><code>[2020-10-27 03:31:50] doctrine.DEBUG: &quot;START TRANSACTION&quot; [] []
  [2020-10-27 03:31:50] doctrine.DEBUG: UPDATE faq SET enabled = ? WHERE id = ? [true,3] []
  [2020-10-27 03:31:50] doctrine.DEBUG: INSERT INTO faq_article (faq_id, article_id) VALUES (?, ?) [3,352] []
  [2020-10-27 03:31:50] doctrine.DEBUG: &quot;COMMIT&quot; [] []
  </code></pre>
  <p>But when i try to add an adress, it's just getting ignored, without any errors</p>
  <p><a href="https://i.stack.imgur.com/dRUV6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dRUV6.png" alt="Postman Request" /></a></p>
  <pre><code>[2020-10-27 03:41:18] doctrine.DEBUG: &quot;START TRANSACTION&quot; [] []
  [2020-10-27 03:41:18] doctrine.DEBUG: UPDATE faq SET enabled = ? WHERE id = ? [true,3] []
  [2020-10-27 03:41:18] doctrine.DEBUG: &quot;COMMIT&quot; [] []
  </code></pre>
  <p>nothing related to my relationship shows up in the log, and the relation is not updated in the database.</p>
  <p>Funny thing, it works great in the other direction, but i can't use that in my application.</p>
  <p><a href="https://i.stack.imgur.com/hUM6a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hUM6a.png" alt="Postman Request" /></a></p>
  <pre><code>[2020-10-27 03:45:07] doctrine.DEBUG: &quot;START TRANSACTION&quot; [] []
  [2020-10-27 03:45:08] doctrine.DEBUG: INSERT INTO faq_adresse (faq_id, adresse_id) VALUES (?, ?) [3,16] []
  [2020-10-27 03:45:08] doctrine.DEBUG: &quot;COMMIT&quot; [] []
  </code></pre>
  <p>And if i manually add the relationship in the database, i'm able to see it when i get my Faq entity</p>
  <p><a href="https://i.stack.imgur.com/Em5fl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Em5fl.png" alt="enter image description here" /></a></p>
  <p>Any idea anyone ? i'm really getting stuck here</p>
  <p>EDIT: I have a legacy easy_admin installed on this project, and everything works great, so i really have something wrong on the api platform side of things.</p>