Hi everyone,

I am relatively new to Django and struggeling with on_delete=models.CASCADE and
MariaDB. I have two simple models which are associated to each other through a
ForeignKey. If I delete one parent object, I would expect the child objects to 
be deleted,
but I get an IntegrityError exception instead.

models.py: https://pastebin.com/xhfKmSAY
views.py: https://pastebin.com/gB5utyv7
urls.py: https://pastebin.com/9L90VKwh

Exception: https://pastebin.com/WspvLiiR

MySQL `show create table`: https://pastebin.com/yT1sjx9P

I was not yet able to test it with MySQL. With Postgres everything works as 
intended.

Any help/hints/advices would be appreciated.

Best Regards

Jan

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/55B7FDC4-0080-40AF-ACD9-33240530CB61%40artfiles.de.

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to