﻿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
36702	bulk_create not returning pk if it was set as an expression	Johannes Westphal	Johannes Westphal	"Currently, when the pk is set on an object passed to `bulk_create` the pk is explicitly not updated in the object:

https://github.com/django/django/blob/05ba1a9228128614fb3c475f1c4bdf0160f44dba/django/db/models/query.py#L843

This becomes a problem if the pk of the object has been set to an expression, because then we have no access to the actual generated pk even though the db returned it.

Would it break any functionality to just remove the line above and also update the pk even if it had been set?"	Bug	closed	Database layer (models, ORM)	5.2	Normal	fixed		Johannes Westphal Simon Charette	Ready for checkin	1	0	0	0	0	0
