#21169: Deletion in custom reverse managers ----------------------------------------------+-------------------- Reporter: sebastian | Owner: nobody Type: Bug | Status: new Component: Database layer (models, ORM) | Version: master Severity: Release blocker | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 ----------------------------------------------+-------------------- The newly implemented custom reverse managers (cf. #3871) expose potentially serious behavior when `remove()` and `clear()` are called: instead of limiting the effects of the removal to the objects considered related by the chosen custom manager, the methods fall back to the unrestricted behavior of the default manager, removing more objects from the relation than is desired.
I'm attaching a test which illustrates the problem for reverse foreign keys with custom managers. I suppose the same behavior is present when using generic foreign keys as well as for the forward and backward sides of many-to-many relations. -- Ticket URL: <https://code.djangoproject.com/ticket/21169> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/052.46d929cdc636b329171c93b8ca3c66a9%40djangoproject.com. For more options, visit https://groups.google.com/groups/opt_out.