﻿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
33770	Add bulk_update() support for unique fields instead of only primary key	Ebram Shehata	nobody	"Currently, `bulk_update()` function from `django.db.models.query` only performs the update using the primary key field..

I think we can generalize it more to use a unique field..
Example: `MyModel.objects.bulk_update(objs, fields=[""name""], unique_field=""national_id"")`
This will use `MyModel.national_id` to identify objects since `national_id` is unique.
I wrote the code for it and I thought to contribute it to Django..

I also have a question about that function, we can't use it to update primary keys.. I'm wondering why ? I want to also add that support to it.

Note: I'm not really sure what to do to reserve the implementation for me. I want to be the one to implement it, actually, I already wrote the code.

Here's a PR I created: https://github.com/django/django/pull/15764"	New feature	closed	Database layer (models, ORM)	4.0	Normal	wontfix	models, orm		Unreviewed	0	1	1	1	0	0
