You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
prefetch_related raising this exception at djongo/sql2mongo/converters.py -- ValueError: invalid literal for int() with base 10: '"article_article_tags"."article_id"'
Article Model
from django.db import models
class Article(models.Model) :
....
tags = models.ManyToManyField(Tag)
.......
Article.objects.prefetch_related('tags').all()
Traceback
djongo.sql2mongo.SQLDecodeError: FAILED SQL: SELECT ("article_article_tags"."article_id") AS "_prefetch_related_val_article_id", "common_tag"."id", "common_tag"."modify_date", "common_tag"."created_date", "common_tag"."name", "common_tag"."description" FROM "common_tag" INNER JOIN "article_article_tags" ON ("common_tag"."id" = "article_article_tags"."tag_id") WHERE "article_article_tags"."article_id" IN (%(0)s)
The text was updated successfully, but these errors were encountered:
tony13tv
added a commit
to tony13tv/djongo
that referenced
this issue
Feb 27, 2021
prefetch_related raising this exception at djongo/sql2mongo/converters.py -- ValueError: invalid literal for int() with base 10: '"article_article_tags"."article_id"'
Article Model
from django.db import models
class Article(models.Model) :
....
tags = models.ManyToManyField(Tag)
.......
Article.objects.prefetch_related('tags').all()
Traceback
djongo.sql2mongo.SQLDecodeError: FAILED SQL: SELECT ("article_article_tags"."article_id") AS "_prefetch_related_val_article_id", "common_tag"."id", "common_tag"."modify_date", "common_tag"."created_date", "common_tag"."name", "common_tag"."description" FROM "common_tag" INNER JOIN "article_article_tags" ON ("common_tag"."id" = "article_article_tags"."tag_id") WHERE "article_article_tags"."article_id" IN (%(0)s)
The text was updated successfully, but these errors were encountered: