Incorrect Documentation for Model.objects.raw()
|Reported by:||boralyl||Owned by:||nobody|
|Severity:||Keywords:||raw, sql, orm, models, db|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The first example under the Performing Raw Queries section (http://docs.djangoproject.com/en/dev/topics/db/sql/#django.db.models.Manager.raw) has an example of a simple model and then using the raw method of the model's objects. The example shows the result of printing the raw query as what looks like queryset results. In actuality the raw query is just printed back to the screen using the repr method. To execute the query it must be iterated over. The example makes it appear the RawQuerySet functions just like a QuerySet does when it is printed(query executed), which it does not.
It may be that this has not yet been implemented yet, and the documentation is for the final version, but just in case I figured I'd file this ticket.