Given the scenario where your subordinate cannot update the master, you might run into problems. Because after updating the data you might read from the old version.
Although these approaches on the forum are very clean and written by authors who are mainly Yii masters. I also have an alternative. You can override the getDbConnection () method in AR, for example
public function getDbConnection(){ if (Yii::app()->user->hasEditedData()) {
But when switching database connections, you still have to be careful.
source share