I've tried to use related manager remove() method with bulk=False but no success.Can anyone tell me what happened and where is mistake ? Thanks.
In order to use remove(obj, bulk=False) I created models like
Then I tried method itself in interactive shell like bellow:
- I've created musician object
- created album object with Foreign key to musician object but I didn't save it
- I called related manager on musician object to remove album from relation with option bulk=False => I expected that this will call save on my album object and than remove foreign key relation but nothing happened, album wasn't saved nor relation on musician was removed. I expected the final call to album to give me <Album: First album None> and album to be saved in data base but it didn't happen.
- The same procedure implemented on add(obj, bulk=False) yield expected results add(album2, bulk=False) saved my alabum2 and added reference to musician object