﻿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
28820	update() produces extra query with proxy model	Yan Mitrofanov	Yan Mitrofanov	"Assume we have these models:
{{{
class Chef(models.Model):
    name = models.CharField(max_length=50)

    class Meta:
        db_table = ""chef""


class ProxyChef(Chef):

    class Meta:
        proxy = True
}}}

If we execute update query on proxy
{{{
ProxyChef.objects.filter(id=1).update(name='William')
}}}

We get two queries
{{{
SELECT ""chef"".""id"" FROM ""chef"" WHERE ""chef"".""id"" = 1
UPDATE ""chef"" SET ""name"" = 'William' WHERE ""chef"".""id"" IN (1)
}}}

The first one is totally unnecessary."	Bug	closed	Database layer (models, ORM)	dev	Normal	fixed			Accepted	1	0	0	1	0	0
