|
@@ -327,6 +327,9 @@
|
|
|
trigger_error("First save of {$this->name} may have failed. No affected rows.", E_USER_WARNING);
|
|
|
}
|
|
|
$this->_data[$pk] = self::$pdo->lastInsertId();
|
|
|
+ if($this->_data[$pk] === 0){
|
|
|
+ trigger_error("First save of {$this->name} may have failed. PK is 0", E_USER_WARNING);
|
|
|
+ }
|
|
|
}
|
|
|
foreach($this->_related as $related){
|
|
|
$related->save();
|