public function getIterator()
{
foreach ($this->persistence->prepareIterator($this) as $data) {
$this->data = $this->persistence->typecastLoadRow($this, $data);
$this->id = $data[$this->id_field];
$this->hook('afterLoad');
(yield $this->id => $this);
}
$this->unload();
}