public function store($bean)
{
$processLists = $this->hasListsOrObjects($bean);
if (!$processLists && !$bean->getMeta('tainted')) {
return $bean->getID();
//bail out!
}
$this->oodb->signal('update', $bean);
$processLists = $this->hasListsOrObjects($bean);
//check again, might have changed by model!
if ($processLists) {
$this->storeBeanWithLists($bean);
} else {
$this->storeBean($bean);
}
$this->oodb->signal('after_update', $bean);
return (string) $bean->id === (string) (int) $bean->id ? (int) $bean->id : (string) $bean->id;
}