The example in the documentation doens't seem to work.
Here a list of the use cases I tested:
Add element only to the many-to-one side: works as expected
Add element only to the one-to-many side: doesn't work
Set the element to null on the many-to-one side: it won't remove the element from the collection
Add element to both side (normal behaviour without enhancements); It will add the element twice to the collection. I don't think this is necessarly a problem but we should be clearer in the documentation.
Here the list of uses cases in form of tests: