{{{
In [1]: profiles=UserProfile.objects.order_by('pk')[:10]
In [2]: print User.objects.filter(userprofile__in=profiles).query
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" INNER JOIN "accounts_userprofile" ON ( "auth_user"."id" =
"accounts_userprofile"."user_id" ) WHERE "accounts_userprofile"."id" IN
(SELECT "accounts_userprofile"."id" FROM "accounts_userprofile" LIMIT 10)
}}}
I also tried this same case on a project running Django 1.8.3, the printed
query was correct as expected.
--
Ticket URL: <https://code.djangoproject.com/ticket/25272>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Per our [https://docs.djangoproject.com/en/dev/internals/release-process
/#supported-versions supported versions policy], 1.6 is no longer
receiving security or bug fixes. Are you saying the issue is fixed in
Django 1.8?
--
Ticket URL: <https://code.djangoproject.com/ticket/25272#comment:1>
Comment (by aykut):
It is fixed in both 1.7 and 1.8. I've tried it on 1.7 too.
--
Ticket URL: <https://code.djangoproject.com/ticket/25272#comment:2>
* status: new => closed
* resolution: => wontfix
--
Ticket URL: <https://code.djangoproject.com/ticket/25272#comment:3>