title: How to raise an error when trying to delete referenced row
body: <p>I'm actually working with sqlalchemy and I use the automap mechanism to generate my classes. I have a question about the deletion policy of this ORM : How can I do to make my programm raises an error when I try to delete a row which is referenced?</p>
  
  <p>My foreign reference is a <code>NOT NULL</code> constraint which means sqlalchemy set the <code>ON DELETE</code> policy to <code>CASCADE</code>.</p>
  
  <p>I see in the documentation that there are two <code>CASCADE</code> policy :</p>
  
  <ul>
  <li><p><code>delete</code> -> columns set to NULL if parent deleted</p></li>
  <li><p><code>delete-orphan</code> -> rows deleted if parent deleted</p></li>
  </ul>
  
  <p>Actually, I don't want sqlalchemy to manage the <code>ON DELETE</code>. I want that my database raised an error. Because for now, when I delete a row referenced, there is a deletion on cascade which is made by sqlalchemy, thing I don't want at all. Is there any way to do that?</p>