- Timestamp:
- 11.07.2006 21:00:11 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/generator/classes/propel/engine/builder/om/php5/PHP5BasicPeerBuilder.php
r417 r423 118 118 } // " . $this->getClassname() . " 119 119 "; 120 } 120 $this->addStaticMapBuilderRegistration($script); 121 } 122 123 /** 124 * Adds the static map builder registration code. 125 * @param string &$script The script will be modified in this method. 126 */ 127 protected function addStaticMapBuilderRegistration(&$script) 128 { 129 $table = $this->getTable(); 130 $mapBuilderFile = $this->getMapBuilderBuilder()->getClassFilePath(); 131 132 $script .= " 133 // This is the static code needed to register the MapBuilder for this table with the main Propel class. 134 // 135 // NOTE: This static code cannot call methods on the ".$this->getPeerClassname()." class, because it is not defined yet. 136 // If you need to use overridden methods, you can add this code to the bottom of the ".$this->getPeerClassname()." class: 137 // 138 // Propel::getDatabaseMap(".$this->getPeerClassname()."::DATABASE_NAME)->addTableBuilder(".$this->getPeerClassname()."::TABLE_NAME, ".$this->getPeerClassname()."::getMapBuilder()); 139 // 140 // Doing so will effectively overwrite the registration below. 141 142 Propel::getDatabaseMap(".$this->getClassname()."::DATABASE_NAME)->addTableBuilder(".$this->getClassname()."::TABLE_NAME, ".$this->getClassname()."::getMapBuilder()); 143 144 "; 145 } 146 121 147 122 148 /** … … 208 234 BasePeer::TYPE_COLNAME => array ("; 209 235 foreach ($tableColumns as $col) { 210 $script .= $this->getColumnConstant($col ).", ";236 $script .= $this->getColumnConstant($col, 'self').", "; 211 237 } 212 238 $script .= "), … … 247 273 BasePeer::TYPE_COLNAME => array ("; 248 274 foreach ($tableColumns as $num => $col) { 249 $script .= $this->getColumnConstant($col )." => $num, ";275 $script .= $this->getColumnConstant($col, 'self')." => $num, "; 250 276 } 251 277 $script .= "),
Note: See TracChangeset
for help on using the changeset viewer.