﻿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
33343	update_or_create seems to issue wrongly limited query to the database	Florian Apolloner	nobody	"Just dumping this here before I forget -- haven't checked yet if this is just the logging output or indeed a wrong query:
{{{
In [2]: User.objects.update_or_create(username='test', defaults={})
(0.000) BEGIN; args=None; alias=default
(0.000) SELECT ""auth_user"".""id"", ""auth_user"".""password"", ""auth_user"".""last_login"", ""auth_user"".""is_superuser"", ""auth_user"".""username"", ""auth_user"".""first_name"", ""auth_user"".""last_name"", ""auth_user"".""email"", ""auth_user"".""is_staff"", ""auth_user"".""is_active"", ""auth_user"".""date_joined"" FROM ""auth_user"" WHERE ""auth_user"".""username"" = 'test' LIMIT 21; args=('test',); alias=default
(0.000) SAVEPOINT ""s140548210464576_x1""; args=None; alias=default
(0.000) INSERT INTO ""auth_user"" (""password"", ""last_login"", ""is_superuser"", ""username"", ""first_name"", ""last_name"", ""email"", ""is_staff"", ""is_active"", ""date_joined"") SELECT '', NULL, 0, 'test', '', '', '', 0, 1, '2021-12-07 07:17:48.232962' RETURNING ""auth_user"".""id""; args=('', None, False, 'test', '', '', '', False, True, '2021-12-07 07:17:48.232962'); alias=default
(0.000) RELEASE SAVEPOINT ""s140548210464576_x1""; args=None; alias=default
Out[2]: (<User: test>, True)
}}}
The `LIMIT 21;` here smells like the query executed for the `repr` of a `Query` object."	Bug	closed	Database layer (models, ORM)	dev	Normal	invalid			Unreviewed	0	0	0	0	1	0
