Difference between #9 and #10 of
Understanding Scenarios

Revision #10 has been created by Luke Jurgs on Feb 11, 2013, 5:24:17 AM with the memo:

Spelling error
« previous (#9)

Changes

Title unchanged

Understanding Scenarios

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

Form validation, Scenarios, validation rules, model validation, understanding

Content changed

[...]
------------------
CActiveRecord sets a number of scenarios internally, any rules you set are validated against these scenarios depending on what operation is performed.

#### 1. Insert

Al
l instances of CActiveRecord instantiated via the constructor with the _new_ keyword are set to this scenario by default. Any rules with the scenario will only be validated on database insert (first call to the save() method).

#### 2. Update
All instances of CActiveRecord instantiated via the find() methods are set to this scenario by default. Any rules with the scenario will only be validated on database updates (subsequent calls to the save() method).

#### 3. Search
[...]
23 0
39 followers
Viewed: 178 751 times
Version: 1.1
Category: Tutorials
Written by: Luke Jurgs
Last updated by: Luke Jurgs
Created on: Oct 28, 2011
Last updated: 11 years ago
Update Article

Revisions

View all history