Skip to content

Commit

Permalink
Merge pull request #2002 from codeigniter4/entityrefactor
Browse files Browse the repository at this point in the history
Entity refactor
  • Loading branch information
lonnieezell authored May 13, 2019
2 parents f6a29f7 + f33fb00 commit 4699642
Show file tree
Hide file tree
Showing 10 changed files with 376 additions and 356 deletions.
10 changes: 10 additions & 0 deletions system/Database/BaseResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ public function getCustomResultObject(string $className)

while ($row = $this->fetchObject($className))
{
if (method_exists($row, 'syncOriginal'))
{
$row->syncOriginal();
}

$this->customResultObject[$className][] = $row;
}

Expand Down Expand Up @@ -277,6 +282,11 @@ public function getResultObject(): array
is_null($this->rowData) || $this->dataSeek(0);
while ($row = $this->fetchObject())
{
if (method_exists($row, 'syncOriginal'))
{
$row->syncOriginal();
}

$this->resultObject[] = $row;
}

Expand Down
Loading

0 comments on commit 4699642

Please sign in to comment.