title: hibernate HQL delete query nullifies single column
body: <p>I am working on spring hibernate application and trying to delete from a table using non-id many-to-one relationship based column.
  Entity classes are:  </p>
  
  <pre><code>@Entity  
  public class Day {  
  @id(name = "DAY_ID")  
  dayId;
  @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
  @JoinColumn(name = "DAY_ID")
  List&lt;Holiday&gt; holidayList;  
  ...  
  }
  
  @Entity  
  public class Holiday {  
  @id(name="HOLIDAY_ID")
  holidayId;  
  @ManyToOne(fetch = FetchType.LAZY)
  @JoinColumn(name = "DAY_ID")
  Day day;
  ...
  }
  </code></pre>
  
  <p>I am trying to delete a row from holiday table using hql.    </p>
  
  <pre><code>String query = "DELETE FROM Holiday WHERE day.dayId = " + dayObject.getdayId();
  Query holidayDeleteQuery = getSession().createQuery(query);
  holidayDeleteQuery.executeUpdate();
  </code></pre>
  
  <p>In the console i am getting proper delete query but on checking DB found out that the row is still there but now the DAY_ID column in holiday table is null. I am not able to figure out why is this happening?<br>
  EDIT: help!!! My main problem is why DAY_ID column is changing to null value??</p>