def test_to_field(self):
        apple = Food.objects.create(name="apple")
        eaten = Eaten.objects.create(food=apple, meal="lunch")

        apple.delete()
Cascade deletion works with ForeignKey.to_field set to non-PK.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/tests/regressiontests/delete_regress/tests.py/DeleteCascadeTransactionTests.test_to_field