Comparing
#35 with
#37
Content
[...]
public function afterSave() // required - database views don't expose this to the schema Yii can access
{
if ($this->getIsNewRecord()) {
$this->id = Yii::app()->db->getLastInsertID(); // I understand this works because MySQL handles it by each individual net connection so there should be no multiuser contention or race conditions
}
return parent::afterSave();[...]
{
if ($this->getIsNewRecord()) {
$this->id = Yii::app()->db->getLastInsertID(); // I understand this works because MySQL handles it by each individual net connection so there should be no multiuser contention or race conditions
}
return parent::afterSave();
}
}
```[...]