mirror of
https://github.com/dg/dibi.git
synced 2025-10-21 17:58:02 +02:00
- DibiPostgreDriver - workaround for bug in pg_affected_rows
- added DibiResult::setObjects([TRUE | FALSE | class name])
This commit is contained in:
@@ -252,9 +252,15 @@ abstract class DibiTable extends /*Nette::*/Object
|
||||
{
|
||||
$row = $this->blankRow;
|
||||
$row[$this->primary] = NULL;
|
||||
if ($this->connection->getConfig('result:objects')) {
|
||||
$row = (object) $row;
|
||||
|
||||
if ($class = $this->connection->getConfig('result:objects')) {
|
||||
if ($class === TRUE) {
|
||||
$row = (object) $row;
|
||||
} else {
|
||||
$row = new $class($row);
|
||||
}
|
||||
}
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user