#24079: Duplicate results of `ManyToManyField` when using 'though'
----------------------------------------------+--------------------
     Reporter:  tanzaho                       |      Owner:  nobody
         Type:  Bug                           |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  1.7
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+--------------------
 When using a many 2 many relation ship with 'though' parameter, the DB is
 returning duplicates when several relations exists for the same pair of
 objects.

 I have the following relations :

 {{{
               tag 1
       user 1 ----->  article 1
               tag 2
       user 1 ----->  article 1
 }}}

 '''Expected behavior :'''


 {{{
 user = User.objects.get(pk=1)
 print user.article.all()
 [<Article: 1>]
 }}}


 '''Observed behavior'''


 {{{
 user = User.objects.get(pk=1)
 print user.article.all()
 [<Article: 1>, <Article: 1>]
 }}}

 More details on Stack Overflow :
 http://stackoverflow.com/questions/27777065/duplicate-results-of-
 manytomanyfield-when-using-though

--
Ticket URL: <https://code.djangoproject.com/ticket/24079>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.3f7e50578934de68befd631d756c552c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to