title: Hibernate cascading: should setting to null on a parent delete children?
body: <p>Collection.clear() will delete children whenever Session flushes.</p>
  
  <p>What about OneToOne? Setting to null is not a correct way. No clear() method for OneToOne exists.</p>
  
  <p>Table_A has a column (not its PK!) that OneToOne references Table_B.</p>
  
  <p>I wonder if Hib works as expected in my case?</p>
  
  <p>My Cascading options are set to "all,delete-orphan".</p>
  
  <p>Table_A @OneToOne Table_B</p>
  
  <p>Table_B @OneToMany Table_C</p>
  
  <p>Now it looks like Table_A . getTable_B . getTable_C_Collection()</p>
  
  <p>Suppose there are elements in Table_C collection.</p>
  
  <p>What I expect from Hibernate: if I set Table_B link to null, then</p>
  
  <p>all Table_C collection elements MUST BE DELETED.</p>
  
  <p>It does not happen. They become ORPHANED !</p>