cakephp/cakephp — pull request #4272 by markstory (2014-08-15 06:48:58+00:00)
Title: Fix exists() being called on every save() operation.

If an entity isNew and contains no primary key data we should not call exists() as there is no way for it to exist yet. Exists should continue to be called when the entity has a primary key value and is marked as new though as it may or may not exist in the database and we need to know.

Fixes #4260