id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 21169,Deletion in custom reverse managers,Sebastian Goll,loic84,"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.",Bug,closed,"Database layer (models, ORM)",dev,Release blocker,fixed,,,Accepted,1,0,0,0,0,0