cakephp/cakephp — pull request #3523 by markstory (2014-05-19 01:59:20+00:00)
Title: Fix issues saving belongsToMany associations

Fix several issues related to saving belongsToMany associations. I checked the following things manually and added additional test coverage for:

* Removing all associations.
* Adding associations.
* Removing all but one.
* Creating a new record with no belongsToMany links.

This set of changes resolves #3485.