This fixes #738 (closed), where foreign key constrains were violated trying out the deletion in the demo app.