Exemplo n.º 1
0
 public function reverseTable(\blaze\ds\meta\TableMetaData $tmd)
 {
     $file = new \blaze\io\File($this->dir, $this->getClassName($tmd->getTableName()) . '.xml');
     $doc = new \DOMDocument('1.0', 'utf-8');
     $class = \blaze\persistence\meta\ClassDescriptor::getClassDescriptor($this->getClassName($tmd->getTableName()));
     $class->setPackage($this->package);
     $class->setTableDescriptor(\blaze\persistence\meta\TableDescriptor::getTableDescriptor($tmd->getTableName()));
     $this->reversePrimaryColumns($class, $tmd->getPrimaryKeys());
     $this->reverseNormalColumns($class, $tmd->getColumns());
     $this->reverseForeignColumns($class, $tmd->getForeignKeys());
     $this->reverseInverseColumns($class, $tmd->getReferencingKeys());
     $t = new \blaze\persistence\meta\driver\XmlMetaDriver();
     $t->save($class, $file);
 }
Exemplo n.º 2
0
 public function addTable(\blaze\ds\meta\TableMetaData $table, $newName = null)
 {
     $this->checkClosed();
     $table->initialize($this, $newName);
     return $table;
 }