﻿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
1796	"[patch] ""Cannot resolve keyword ___ into field"" error when working with ManyToMany relation"	anonymous	Adrian Holovaty	"Any attempt to get the related objects from a many to many relation using all() fails.  For example the line


{{{
a1.primary_categories.all()
}}}


in tests/modeltests/m2m_multiple fails with the following error:

{{{
Traceback (most recent call last):
  File ""<stdin>"", line 1, in ?
  File ""C:\Python24\lib\site-packages\django\db\models\query.py"", line 88, in __
repr__
    return repr(self._get_data())
  File ""C:\Python24\lib\site-packages\django\db\models\query.py"", line 378, in _
get_data
    self._result_cache = list(self.iterator())
  File ""C:\Python24\lib\site-packages\django\db\models\query.py"", line 159, in i
terator
    select, sql, params = self._get_sql_clause()
  File ""C:\Python24\lib\site-packages\django\db\models\query.py"", line 392, in _
get_sql_clause
    tables2, joins2, where2, params2 = self._filters.get_sql(opts)
  File ""C:\Python24\lib\site-packages\django\db\models\query.py"", line 523, in g
et_sql
    tables2, joins2, where2, params2 = val.get_sql(opts)
  File ""C:\Python24\lib\site-packages\django\db\models\query.py"", line 572, in g
et_sql
    return parse_lookup(self.kwargs.items(), opts)
  File ""C:\Python24\lib\site-packages\django\db\models\query.py"", line 677, in p
arse_lookup
    tables2, joins2, where2, params2 = lookup_inner(path, clause, value, opts, o
pts.db_table, None)
  File ""C:\Python24\lib\site-packages\django\db\models\query.py"", line 780, in l
ookup_inner
    raise TypeError, ""Cannot resolve keyword '%s' into field"" % name
TypeError: Cannot resolve keyword 'primary_article_set' into field
}}}
"	defect	new	Database layer (models, ORM)	SVN	critical				Unreviewed	1	0	0	0	0	0
