1: <?php
2:
3: namespace cli_db\propel\map;
4:
5: use \RelationMap;
6: use \TableMap;
7:
8:
9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20:
21: class OrganismTableMap extends TableMap
22: {
23:
24: 25: 26:
27: const CLASS_NAME = 'cli_db.map.OrganismTableMap';
28:
29: 30: 31: 32: 33: 34: 35:
36: public function initialize()
37: {
38:
39: $this->setName('organism');
40: $this->setPhpName('Organism');
41: $this->setClassname('cli_db\\propel\\Organism');
42: $this->setPackage('cli_db');
43: $this->setUseIdGenerator(true);
44: $this->setPrimaryKeyMethodInfo('organism_organism_id_seq');
45:
46: $this->addPrimaryKey('organism_id', 'OrganismId', 'INTEGER', true, null, null);
47: $this->addColumn('abbreviation', 'Abbreviation', 'VARCHAR', false, 255, null);
48: $this->addColumn('genus', 'Genus', 'VARCHAR', true, 255, null);
49: $this->addColumn('species', 'Species', 'VARCHAR', true, 255, null);
50: $this->addColumn('common_name', 'CommonName', 'VARCHAR', false, 255, null);
51: $this->addColumn('comment', 'Comment', 'LONGVARCHAR', false, null, null);
52:
53: }
54:
55: 56: 57:
58: public function buildRelations()
59: {
60: $this->addRelation('Biomaterial', 'cli_db\\propel\\Biomaterial', RelationMap::ONE_TO_MANY, array('organism_id' => 'taxon_id', ), 'SET NULL', null, 'Biomaterials');
61: $this->addRelation('Feature', 'cli_db\\propel\\Feature', RelationMap::ONE_TO_MANY, array('organism_id' => 'organism_id', ), 'CASCADE', null, 'Features');
62: }
63:
64: }
65: