protected function onLoad(array $data)
{
foreach ($this->metadata->getProperties() as $name => $metadataProperty) {
if (!$metadataProperty->isVirtual && isset($data[$name])) {
$this->data[$name] = $data[$name];
}
}
$this->persistedId = $this->getValue('id');
}