Change input parameter to collection to be prepared for Set and List
Collections. Map must call Map.values();

More detailed javadoc documentation

Input collections must not be null. Throws NullPointerException
1. Dont execute a previous user accident and 2. cleaner code.

Optional deletion of objects to prevent the user to delete manually, if
there s no need anymore for them. I thougt it could be a good idea to
take the delete rule, but this is maybe not always a good choice. At the
moment you have to say delete=true or false when calling the setter
method.

TODO: David wrote, it would be a better idea to put this methods into
CayenneDataObject and let the template just call
setToManyRelationship($rel.Name, collection)