title: One to one mapping cascade type
body: <p>i am creating application that works with database via hibernate. And i have a problem. I have One-to-one mapping for example.</p>
  
  <pre><code>public class Parent {
  
  private long id;
  </code></pre>
  
  <p>and </p>
  
  <pre><code>public class Child {
  
  private id;
  
  @OneToOne
  private Parent parent;
  </code></pre>
  
  <p>So the case is that when i am removing parent entity, child must be deleted to. But i cant add child_id field to parent entity and set cascade type all. I need to set it into child. Is there any annotation or any other way to do that. To 'tell' to the child that when parent is deleting child must be deleted to?</p>