title: Symfony Doctrine relationships - delete entity on the inverse side
body: <p>my question is how to delete entity on the inverse side without going through every association and delete it manually.</p>
  
  <pre><code>&lt;?php
  
  /** @Entity */
  class User
  {
      // ...
      /**
       * @OneToMany(targetEntity="Address", mappedBy="user")
       */
      private $addresses;
      // ...
  
      public function __construct() {
          $this-&gt;addresses = new ArrayCollection();
      }
  }
  
  /** @Entity */
  class Address
  {
      // ...
      /**
       * @ManyToOne(targetEntity="User", inversedBy="features")
       * @JoinColumn(name="user_id", referencedColumnName="id")
       */
      private $user;
      // ...
  }
  </code></pre>
  
  <p>In this example, <code>Address</code> is the owning side, so I can't delete <code>User</code> because foreign key validation will fail. I have to delete <code>Address</code> and then delete <code>User</code>. If I have 10 relationships like these the delete process is painful. </p>
  
  <p>I can create <code>ManyToMany</code> relationship, but this way the <code>Address</code> entity will have <code>users</code> not <code>user</code> and I want addresses to have only one user.</p>
  
  <p>What is the best way to do this?</p>