> Seems like you're seeing this:http://code.djangoproject.com/ticket/10060
Yes, It's a big bug.
> Try to add distinct() to query set.
It's work.. Thanks Alex... distinct is not very fast but it's last way
to fix the problem...
Proper query:
e = File.objects.annotate(comment_cnt=Count('comment',
Try to add distinct() to query set.
On Fri, Mar 20, 2009 at 10:06 PM, eli wrote:
>
> Hi,
>
> I have a problem with Django Orm annotate method..
>
> My models (application: app):
>
> class File(models.Model):
> name = models.CharField(max_length=255)
> file = MyFileField(upload_to=...)
>
> clas
I'm using latest SVN version of Django (10105 revision)
regards.
--~--~-~--~~~---~--~~
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
On Fri, Mar 20, 2009 at 3:06 PM, eli wrote:
>
> Hi,
>
> I have a problem with Django Orm annotate method..
>
> My models (application: app):
>
> class File(models.Model):
> name = models.CharField(max_length=255)
> file = MyFileField(upload_to=...)
>
> class Visit(models.Model):
> file = model
Hi,
I have a problem with Django Orm annotate method..
My models (application: app):
class File(models.Model):
name = models.CharField(max_length=255)
file = MyFileField(upload_to=...)
class Visit(models.Model):
file = models.ForeignKey(File)
class Comment(models.Model):
file = models
5 matches
Mail list logo