ar.md 617 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

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

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

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

### Basic Queries

### Relational Queries

### Scopes