Thanks Andy for the help and Alex for clarifying. I'll do as Andy said and denormalize the data and add a comments counter field to the entry model.
(Deconfuse: I changed my display name from Marlun to my whole name after creating this thread.) -Martin On May 16, 3:58 pm, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Sat, May 16, 2009 at 3:59 AM, Andy Mikhailenko <neith...@gmail.com>wrote: > > > > > > > > Any aggregation over generic relations is currently unsupported, it was > > > hoped this would make it into 1.1, but unfortunately some of the way SQL > > > works prevented this (since it requires us to change the underlying Query > > to > > > allow support for additional conditions on a join clause). > > > Alex, thanks for your comment. > > However, this code works for me with Django 1.1 beta1 (rev10793). > > I understand that one should not rely on undocumented behaviour, but > > does this case illustrate some part of work that has already been done > > in this area? Or am I just missing something and that query does/will > > not work in current or upcoming revisions? > > > Thanks! > > > Andy > > It doesn't raise any exceptions, however it doesn't necessarily return the > correct results (if you never have comments against another model it > actually will return the correct results I think, but that's no guaranteed). > > Alex > > -- > "I disapprove of what you say, but I will defend to the death your right to > say it." --Voltaire > "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---