﻿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
20170	LIMIT works on entire queryset, even when not expected to.	anonymous	nobody	"{{{
Class MyParent(models.Model):
    x = models.IntegerField()

Class MyChild(models.Model):
    parent = models.ForeignKey(MyParent)
    y      = models.IntegerField()

x = MyModel1.objects.all()[:5]
x.values('x', 'mychild')
}}}

The resulting queryset will possibly return less than 5 objects and then possibly not all of their children (because it adds 'LIMIT 5' to the entire SQL query instead of making one query with 'LIMIT 5' and another one with the join)."	Bug	closed	Database layer (models, ORM)	1.4	Normal	needsinfo	ManyToManyField		Unreviewed	0	0	0	0	0	0
