protected function OnStructureInitialized(Relational\Database $Database)
{
$Registrar = new Containers\Registrar(StructuralTableTrait::GetType());
$PrimaryKeyColumns = $this->GetPrimaryKeyColumns();
if (count($PrimaryKeyColumns) > 0) {
$Registrar->Register(new Traits\PrimaryKey($PrimaryKeyColumns));
}
$this->RegisterStructuralTraits($Registrar);
foreach ($Registrar->GetRegistered() as $Trait) {
$this->AddTrait($Trait);
}
$this->KeyGenerator = $this->KeyGenerator($Database->GetPlatform()->GetKeyGeneratorSet());
if ($this->KeyGenerator !== null) {
$this->KeyGenerator->SetTable($this);
}
}