﻿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
12731	Manager.raw() doesn't work with Multi-table inheritance	eric.buckley@…	nobody	"As far as I can tell the Manager.raw() function does not work with a subclassed model.  I believe the raw function is looking for an 'id' field, and this does not exist in a subclassed table (instead of id, there is a <parent>_ptr_id field).

example:


{{{
class Parent(models.Model)
 name = models.CharField(max_length=50)

class Child(Parent)
 favorite_toy = models.CharField(max_length=50)

# broken code
Child.objects.raw(""SELECT * FROM child"")
}}}
"		closed	Database layer (models, ORM)	dev		fixed	raw		Accepted	1	0	0	0	0	0
