title: Default value or NULL in Room database entity
body: <p>I'm trying to understand Room database library. I am struck with a scenario where two tables are linked via <strong>@ForeignKey constraint</strong>. What I need is, when the parent row is deleted, all the child columns in the child table should be set to NULL or some default value. But when I tried to use </p>
  
  <pre><code>onDelete=SET_NULL or SET_DEFAULT with @ForeignKey
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>android.database.sqlite.SQLiteConstraintException: NOT NULL constraint
    failed: Log.tagId</p>
  </blockquote>
  
  <p>From the error I can see that the child column has been set as <strong>NOT NULL</strong> during the table definition, can someone say how to change it to be <strong>NULLABLE</strong> since room creates the tables for us? Also, it is ok if we can set a standard default value on the columns. If so, how to set the default value of columns? I think there should be some way else the constants <strong>SET_NULL</strong> or <strong>SET_DEFAULT</strong> has no meaning and purpose.</p>
  
  <p>Thanks in advance!</p>