From 601407067670684334a971257a35759ed81d918e Mon Sep 17 00:00:00 2001 From: resurtm Date: Mon, 13 May 2013 22:30:05 +0600 Subject: [PATCH] AR atomic scenarios internals doc fix. --- docs/internals/ar.md | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/docs/internals/ar.md b/docs/internals/ar.md index 9bb54d3..f6d2b72 100644 --- a/docs/internals/ar.md +++ b/docs/internals/ar.md @@ -10,25 +10,13 @@ All possible scenario formats supported by ActiveRecord: public function scenarios() { return array( - // 1. attributes array + // attributes array, all operations won't be wrapped with transaction 'scenario1' => array('attribute1', 'attribute2'), - // 2. insert, update and delete operations won't be wrapped with transaction (default mode) + // insert and update operations will be wrapped with transaction, delete won't be wrapped 'scenario2' => array( 'attributes' => array('attribute1', 'attribute2'), - 'atomic' => array(), // default value - ), - - // 3. insert and update operations will be wrapped with transaction, delete won't be wrapped - 'scenario4' => array( - 'attributes' => array('attribute1', 'attribute2'), - 'atomic' => array(self::OPERATION_INSERT, self::OPERATION_UPDATE), - ), - - // 5. insert and update operations won't be wrapped with transaction, delete will be wrapped - 'scenario5' => array( - 'attributes' => array('attribute1', 'attribute2'), - 'atomic' => array(self::OPERATION_DELETE), + 'atomic' => array(self::OP_INSERT, self::OP_UPDATE), ), ); }