title: Self referencing foreign key - mysql not set to null
body: <p>Indexes :</p>
  
  <pre><code>Keyname    Type   Unique  Packed  Column     Cardinality Collation  Null        
  parent_id  BTREE  No      No      parent_id  1           A          YES 
  </code></pre>
  
  <p>Table : (comments)</p>
  
  <pre><code>Column      Type        Null    Default Extra
  id          int(11)     No      None    AUTO_INCREMENT      
  parent_id   int(11)     Yes     NULL
  </code></pre>
  
  <p>Relation view:</p>
  
  <pre><code>Column     Foreign key constraint (INNODB)
  parent_id  'test_site'.'comments'.'id'  ON DELETE CASCADE   ON UPDATE  NO ACTION
  </code></pre>
  
  <p>Is it possible to have parent_id not set to NULL. I have tried setting the default value to '0' and inserting the value '0' but I get the following error.</p>
  
  <p>Error:</p>
  
  <pre><code>SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update 
  a child row: a foreign key constraint fails (`test_site`.`comments`, 
  CONSTRAINT `comments_ibfk_2` FOREIGN KEY (`parent_id`) REFERENCES `comments` 
  (`id`) ON DELETE CASCADE ON UPDATE NO ACTION)
  </code></pre>
  
  <p>Any help on this would be much appreciated, Thank you.</p>