> > I need to get all blogs that belong to certain user and are empty (do > not have any articles). I can't figure out how to make it with without > extra() method.
As others have recommended, just use the extra() method. It's not so bad :) If you really really want to avoid that, you could add a count integer field to your Blog model and maintain its value from overridden methods Article.save() and Article.delete(). So Blog.count would get refreshed every time you add/update/delete articles and your desired query becomes a straight lookup on Blog. --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---