id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 21205 related_objects() fails on SQLite when passing more than 999 objects Andrei Picus nobody "Using SQLite, trying to delete objects that have more than 999 related objects will fail with a 'too many SQL variables' error. This is due to the related_objects() method getting all the related objects in one query. I've written a patch to fetch the related objects in batches using the bulk_batch_size database ops. You can check it here: https://github.com/django/django/pull/1699 Also added a new test to check for this new behavior. All comments are welcome." Bug closed Database layer (models, ORM) dev Normal duplicate sqlite delete related 999 Unreviewed 1 0 0 0 0 0