Yii2 Bootstrap 3
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

617 B

ActiveRecord

Scenarios

Possible scenario formats supported by ActiveRecord:

public function scenarios()
{
    return [
        // attributes array, all operations won't be wrapped with transaction
        'scenario1' => ['attribute1', 'attribute2'],

        // insert and update operations will be wrapped with transaction, delete won't be wrapped
        'scenario2' => [
            'attributes' => ['attribute1', 'attribute2'],
            'atomic' => [self::OP_INSERT, self::OP_UPDATE],
        ],
    ];
}

Query

Basic Queries

Relational Queries

Scopes