#6707: Another implementation for ReverseManyRelatedObjectsDescriptor.__set__
method
-----------------------------------+----------------------------------------
Reporter: favo <[EMAIL PROTECTED]> | Owner: nobody
Status: new | Component: Database wrapper
Version: SVN | Keywords:
Stage: Unreviewed | Has_patch: 1
-----------------------------------+----------------------------------------
Current ReverseManyRelatedObjectsDescriptor implement set method:
1. clear all data
2. set to new data.
This may cause a huge data changes, especially when using Django Admin,
the default M2M field save_form_data() method use the set method to
maintain m2m data from form:
{{{
def save_form_data(self, instance, data):
setattr(instance, self.attname, data)
}}}
In most case we just want to add remove a small set data from m2m
relaionship list. This patch use another implementation, first it delete
all exist rows but not in the new data list, then only add new data which
not in database.
--
Ticket URL: <http://code.djangoproject.com/ticket/6707>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---