title: Delete child from parent and parent from child automatically with JPA annotations
body: <p>Suppose that we have 3 Entities object class:</p>
  
  <pre><code>class Parent {
      String name;
      List&lt;Child&gt; children;
  }
  
  class Child {
      String name;
      Parent parent;
  }
  
  class Toy {
      String name;
      Child child;
  }
  </code></pre>
  
  <p>How can I use JPA2.x (or hibernate) annotations to:</p>
  
  <ol>
  <li>Delete all children automatically when parent delete (one to many)</li>
  <li>Delete child automatically from children list when it is deleted (many to one)</li>
  <li>Delete toy automatically when child remove (one to one)</li>
  </ol>
  
  <p>I'm using Hibernate 4.3.5 and mysql 5.1.30.</p>
  
  <p>Thanks</p>