﻿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
35159	dumpdata crashes on querysets with prefetch_related().	Andrea F	Mariusz Felisiak	"The `./manage.py dumpdata` management command calls `iterator()` on the QuerySets of the models, but it does not pass `chunk_size`([https://github.com/django/django/blob/main/django/core/management/commands/dumpdata.py#L222]). On model QuerySets that include `prefetch_related`, this now (with 5.0) causes this error while running `dumpdata`:

> CommandError: Unable to serialize database: chunk_size must be provided when using QuerySet.iterator() after prefetch_related().

Proposed fix is to pass a suitable `chunk_size` parameter to `iterator()` within `handle()` in `dumpdata.py`."	Bug	closed	Core (Management commands)	5.0	Release blocker	fixed	dumpdata chunk_size iterator prefetch_related	Jacob Walls Raphael Kimmig Simon Charette	Accepted	1	0	0	0	0	0
