/** * Adds the unique constraints described in the meta data. * * @param OODBBean $bean bean * * @return void */ private function addUniqueConstraints(OODBBean $bean) { if ($uniques = $bean->getMeta('buildcommand.unique')) { $table = $bean->getMeta('type'); foreach ($uniques as $unique) { if (!$this->isChilled($table)) { $this->writer->addUniqueIndex($table, $unique); } } } }