﻿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
29764	Allow using QuerySet.in_bulk() with a composed unique field	Jean-Daniel	nobody	"For instance, I have a model 'Data' with an unique_together constraint on (foo, bar) fields.

I would like to use in_bulk() on a query like:

{{{
  Data.objects.filter(foo='a').in_bulk(<list of bar values>, field_name='bar').
}}}

Obviously, the fact that bar is not unique should not be an issue to run the query, but Django performs a check to make sure the queried field is unique and raise an error if not.

As it may not be simple to check for all cases where field_name would result in a unique constraint, maybe it should be possible to disable this check (using an optional parameter).
 "	New feature	closed	Database layer (models, ORM)	2.1	Normal	wontfix			Unreviewed	0	0	0	0	0	0
