Changes between Initial Version and Version 1 of Ticket #28514


Ignore:
Timestamp:
Aug 21, 2017, 8:23:26 AM (7 years ago)
Author:
Tim Graham
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28514

    • Property Easy pickings set
    • Property Triage Stage UnreviewedAccepted
    • Property Summary Documentating idempotence of Many2ManyField.add()Clarify docs regarding idempotence of RelatedManager.add()
  • Ticket #28514 – Description

    initial v1  
    1 At https://docs.djangoproject.com/en/1.11/topics/db/examples/many_to_many/ is written:
    2 
     1At https://docs.djangoproject.com/en/1.11/topics/db/examples/many_to_many/ it's written:
     2{{{
    33>> a2.publications.add(p3)
    44>
     
    66>
    77>> a2.publications.add(p3)
    8 
     8}}}
    99Please rephrase it to "Adding a second time is OK, it doesn't duplicate the relation".
    1010
    11 
    12 At https://docs.djangoproject.com/en/1.11/ref/models/relations/ is written:
    13 
     11At https://docs.djangoproject.com/en/1.11/ref/models/relations/ it's written:
     12{{{
    1413 add(*objs, bulk=True)
    1514 Adds the specified model objects to the related object set.
    16 
     15}}}
    1716Please amend: "Inserting existing relations this way does not cause problems."
    1817
    19 The purpose of the changes is to make clear, that add() is idempotent and it is not necessary first to read the data from the database, join with the new values and eventually write the resulting set back.
     18The purpose of the changes is to make clear, that `add()` is idempotent and it is not necessary first to read the data from the database, join with the new values and eventually write the resulting set back.
Back to Top