ar.md 642 Bytes
Newer Older
Qiang Xue committed
1 2 3
ActiveRecord
============

4 5 6
Scenarios
---------

resurtm committed
7
Possible scenario formats supported by ActiveRecord:
8 9 10 11 12

```php
public function scenarios()
{
    return array(
13
        // attributes array, all operations won't be wrapped with transaction
14 15
        'scenario1' => array('attribute1', 'attribute2'),

16
        // insert and update operations will be wrapped with transaction, delete won't be wrapped
17 18
        'scenario2' => array(
            'attributes' => array('attribute1', 'attribute2'),
19
            'atomic' => array(self::OP_INSERT, self::OP_UPDATE),
20 21 22 23 24
        ),
    );
}
```

Qiang Xue committed
25 26 27 28 29 30 31 32
Query
-----

### Basic Queries

### Relational Queries

### Scopes