|
@@ -321,15 +321,15 @@
|
|
|
if($table->update($data, [
|
|
|
$pk => $this->id
|
|
|
]) === 0){
|
|
|
- trigger_error("Save of {$this->name} may have failed. No affected rows.", E_USER_WARNING);
|
|
|
+ trigger_error("Save of {$this->name}#{$this->id} may have failed. No affected rows.", E_USER_WARNING);
|
|
|
}
|
|
|
}else{
|
|
|
if($table->insert($data) === 0){
|
|
|
- trigger_error("First save of {$this->name} may have failed. No affected rows.", E_USER_WARNING);
|
|
|
+ trigger_error("First save of {$this->name} instance may have failed. No affected rows.", E_USER_WARNING);
|
|
|
}
|
|
|
- $this->_data[$pk] = self::$pdo->lastInsertId();
|
|
|
+ $this->_data[$pk] = $table->lastInsertId();
|
|
|
if($this->_data[$pk] === 0){
|
|
|
- trigger_error("First save of {$this->name} may have failed. PK is 0", E_USER_WARNING);
|
|
|
+ trigger_error("First save of {$this->name} instance may have failed. PK is 0", E_USER_WARNING);
|
|
|
}
|
|
|
}
|
|
|
foreach($this->_related as $related){
|