title: Deleting row with a foreign key constraint
body: <p>I have a MySQL table called 'node', with a foreign key named 'parentNodeId' which references another row in this table; this way, I can have nodes within other nodes through a foreign key.</p>
  
  <p>Ok then, the problem is when I want to delete a row in this table, a SQL error outputs:</p>
  
  <blockquote>
    <p>Cannot delete or update a parent row: a foreign key constraint fails 
    (<code>PFeCommerce</code>.<code>node</code>, CONSTRAINT <code>FK_857FE84548C76A8E</code> FOREIGN KEY
    (<code>parentNodeId</code>) REFERENCES <code>node</code> (<code>id</code>))</p>
  </blockquote>
  
  <p>So I go to the row that I want to delete, and I set the field 'parentNodeId' with a NULL value. But the error still happening. </p>
  
  <p>What am I doing wrong?</p>