protected function storeBean(OODBBean $bean)
{
if ($bean->getMeta('changed')) {
$this->check($bean);
$table = $bean->getMeta('type');
$this->createTableIfNotExists($bean, $table);
$updateValues = array();
foreach ($bean as $property => $value) {
if ($property !== 'id') {
$this->modifySchema($bean, $property, $value);
}
if ($property !== 'id') {
$updateValues[] = array('property' => $property, 'value' => $value);
}
}
$bean->id = $this->writer->updateRecord($table, $updateValues, $bean->id);
$bean->setMeta('changed', FALSE);
}
$bean->setMeta('tainted', FALSE);
}