cakephp/cakephp — pull request #4646 by markstory (2014-09-18 11:04:42+00:00)
Title: Validate all entities before saving

This change fixes #3600, and dramatically changes how save() works. Instead of validating and saving entities in sequence, all entities arepre-validated. If all validation succeeds then entities will be saved. This makes the 'validate' option act like validate=first in 2.x. The 'atomic' is almost entirely orthogonal controlling whether or not the save is run in a transaction or not.

The associated parents do not need to be revalidated so we can disable validation for them. However, child association do need further validation as the save process for belongsToMany materializes new objects that need validation applied.

With all of the above said, this behavior change might not be a good fit for save(). An alternative to this approach is to have a method that pre-validates all entities and then saves with validation off.