mam istniejąca już bazę danych, więc za pomocą skryptu doctrine robie import tabel. I teraz mam pytanie czy doctrine ustaliło mi relacje, klucze obce między tabelami czy sam musze to zrobić?
Bo jak zaglądam w wygenerowany kod to tam jest coś takiego:

  1. <?php
  2. abstract class BaseFile extends Doctrine_Record
  3. {
  4.  
  5. public function setTableDefinition()
  6. {
  7. $this->setTableName('file');
  8. $this->hasColumn('id', 'integer', 4, array('alltypes' => array( 0 => 'integer', ), 'ntype' => 'int(10) unsigned', 'unsigned' => 1, 'values' => array(), 'primary' => true, 'notnull' => true, 'autoincrement' => true));
  9. $this->hasColumn('name', 'string', 150, array('alltypes' => array( 0 => 'string', ), 'ntype' => 'varchar(150)', 'fixed' => false, 'values' => array(), 'primary' => false, 'notnull' => false, 'autoincrement' => false));
  10. $this->hasColumn('size', 'integer', 8, array('alltypes' => array( 0 => 'integer', ), 'ntype' => 'bigint(20)', 'unsigned' => 0, 'values' => array(), 'primary' => false, 'notnull' => false, 'autoincrement' => false));
  11. $this->hasColumn('modified', 'integer', 8, array('alltypes' => array( 0 => 'integer', ), 'ntype' => 'bigint(20)', 'unsigned' => 0, 'values' => array(), 'primary' => false, 'notnull' => false, 'autoincrement' => false));
  12. $this->hasColumn('type', 'string', 10, array('alltypes' => array( 0 => 'string', ), 'ntype' => 'varchar(10)', 'fixed' => false, 'values' => array(), 'primary' => false, 'notnull' => false, 'autoincrement' => false));
  13. $this->hasColumn('content', 'string', null, array('alltypes' => array( 0 => 'string',  1 => 'clob', ), 'ntype' => 'text', 'fixed' => false, 'values' => array(), 'primary' => false, 'notnull' => false, 'autoincrement' => false));
  14. $this->hasColumn('path', 'string', null, array('alltypes' => array( 0 => 'string',  1 => 'clob', ), 'ntype' => 'text', 'fixed' => false, 'values' => array(), 'primary' => false, 'notnull' => false, 'autoincrement' => false));
  15. }
  16.  
  17. public function setUp()
  18. {
  19. parent::setUp();
  20. }
  21. ?>


nie ma natomiast w setUp() ustalonych relacji, kluczy obcych??