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 BiomaterialTableMap extends TableMap
22: {
23:
24: 25: 26:
27: const CLASS_NAME = 'cli_db.map.BiomaterialTableMap';
28:
29: 30: 31: 32: 33: 34: 35:
36: public function initialize()
37: {
38:
39: $this->setName('biomaterial');
40: $this->setPhpName('Biomaterial');
41: $this->setClassname('cli_db\\propel\\Biomaterial');
42: $this->setPackage('cli_db');
43: $this->setUseIdGenerator(true);
44: $this->setPrimaryKeyMethodInfo('biomaterial_biomaterial_id_seq');
45:
46: $this->addPrimaryKey('biomaterial_id', 'BiomaterialId', 'INTEGER', true, null, null);
47: $this->addForeignKey('taxon_id', 'TaxonId', 'INTEGER', 'organism', 'organism_id', false, null, null);
48: $this->addForeignKey('biosourceprovider_id', 'BiosourceproviderId', 'INTEGER', 'contact', 'contact_id', false, null, null);
49: $this->addColumn('dbxref_id', 'DbxrefId', 'INTEGER', false, null, null);
50: $this->addColumn('name', 'Name', 'LONGVARCHAR', false, null, null);
51: $this->addColumn('description', 'Description', 'LONGVARCHAR', false, null, null);
52:
53: }
54:
55: 56: 57:
58: public function buildRelations()
59: {
60: $this->addRelation('Contact', 'cli_db\\propel\\Contact', RelationMap::MANY_TO_ONE, array('biosourceprovider_id' => 'contact_id', ), 'SET NULL', null);
61: $this->addRelation('Organism', 'cli_db\\propel\\Organism', RelationMap::MANY_TO_ONE, array('taxon_id' => 'organism_id', ), 'SET NULL', null);
62: $this->addRelation('AssayBiomaterial', 'cli_db\\propel\\AssayBiomaterial', RelationMap::ONE_TO_MANY, array('biomaterial_id' => 'biomaterial_id', ), 'CASCADE', null, 'AssayBiomaterials');
63: $this->addRelation('BiomaterialRelationshipRelatedByObjectId', 'cli_db\\propel\\BiomaterialRelationship', RelationMap::ONE_TO_MANY, array('biomaterial_id' => 'object_id', ), null, null, 'BiomaterialRelationshipsRelatedByObjectId');
64: $this->addRelation('BiomaterialRelationshipRelatedBySubjectId', 'cli_db\\propel\\BiomaterialRelationship', RelationMap::ONE_TO_MANY, array('biomaterial_id' => 'subject_id', ), null, null, 'BiomaterialRelationshipsRelatedBySubjectId');
65: $this->addRelation('Biomaterialprop', 'cli_db\\propel\\Biomaterialprop', RelationMap::ONE_TO_MANY, array('biomaterial_id' => 'biomaterial_id', ), 'CASCADE', null, 'Biomaterialprops');
66: }
67:
68: }
69: