Anything that is multi-valued is problematic because you have to (a)
work out a way to represent the results (that bit's actually fairly easy
and (b) make sure that people don't shoot themselves in the foot by
trying to extract more than one multi-valued result at a time. Part (b)
is a little tricky, because it's surprisingly easy to do by accident.
The problem with multiple multi-valued results is that you cannot do it
efficiently in a single SQL query without using UNION (and constructing
the UNION to be efficient isn't completely trivial either in the general
case). So it's not too hard to construct the naïve query for a something
with multi-valued field #1 returning 1000 results and multi-valued field
#2 returning 1000 results that ends up retrieving 1000 * 1000 = 1 000
000 rows, rather than only 2000 rows (you must query for the #1 and #2
fields separately).
The same category of problem includes using many-to-many fields in
select_related. It also includes doing the same thing in values()
queries.
Not impossible to solve, but important to solve it efficiently and not
entirely trivial to do so. Therefore, something for The Future.
Regards,
Malcolm
--
Remember that you are unique. Just like everyone else.
http://www.pointy-stick.com/blog/