Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
60140706
Commit
60140706
authored
May 13, 2013
by
resurtm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AR atomic scenarios internals doc fix.
parent
35688b32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
15 deletions
+3
-15
ar.md
docs/internals/ar.md
+3
-15
No files found.
docs/internals/ar.md
View file @
60140706
...
...
@@ -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
),
),
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment