hello,
class A(models.Model):
....
bs = models.ManyToManyField('B')
class B(models.Model):
....
how to implement this query:
select *
from myapp_a
inner join (select a_id, count(*)
from myapp_a_bs
group by a_id) as a
on myapp_a.id=a.a_id;
thanks for any help!
konstantin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---