Skip to content

Instantly share code, notes, and snippets.

@robwilkerson
Created November 18, 2011 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robwilkerson/1377055 to your computer and use it in GitHub Desktop.
Save robwilkerson/1377055 to your computer and use it in GitHub Desktop.
CakePHP: Testing the success of a non-atomic call to Model::saveAll()
if( !in_array( false, Set::flatten( $this->Model->saveAll( $this->data['Model'], array( 'atomic' => false ) ) ) ) {
# Success code
}
else {
# Fail code
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment