| @@ 286-303 (lines=18) @@ | ||
| 283 | * rethrown wrapped into a PropelException. |
|
| 284 | * @return array (Record object, last column rank) |
|
| 285 | */ |
|
| 286 | public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) |
|
| 287 | { |
|
| 288 | $key = RecordTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType); |
|
| 289 | if (null !== ($obj = RecordTableMap::getInstanceFromPool($key))) { |
|
| 290 | // We no longer rehydrate the object, since this can cause data loss. |
|
| 291 | // See http://www.propelorm.org/ticket/509 |
|
| 292 | // $obj->hydrate($row, $offset, true); // rehydrate |
|
| 293 | $col = $offset + RecordTableMap::NUM_HYDRATE_COLUMNS; |
|
| 294 | } else { |
|
| 295 | $cls = RecordTableMap::OM_CLASS; |
|
| 296 | /** @var Record $obj */ |
|
| 297 | $obj = new $cls(); |
|
| 298 | $col = $obj->hydrate($row, $offset, false, $indexType); |
|
| 299 | RecordTableMap::addInstanceToPool($obj, $key); |
|
| 300 | } |
|
| 301 | ||
| 302 | return array($obj, $col); |
|
| 303 | } |
|
| 304 | ||
| 305 | /** |
|
| 306 | * The returned array will contain objects of the default type or |
|
| @@ 262-279 (lines=18) @@ | ||
| 259 | * rethrown wrapped into a PropelException. |
|
| 260 | * @return array (Player object, last column rank) |
|
| 261 | */ |
|
| 262 | public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) |
|
| 263 | { |
|
| 264 | $key = PlayerTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType); |
|
| 265 | if (null !== ($obj = PlayerTableMap::getInstanceFromPool($key))) { |
|
| 266 | // We no longer rehydrate the object, since this can cause data loss. |
|
| 267 | // See http://www.propelorm.org/ticket/509 |
|
| 268 | // $obj->hydrate($row, $offset, true); // rehydrate |
|
| 269 | $col = $offset + PlayerTableMap::NUM_HYDRATE_COLUMNS; |
|
| 270 | } else { |
|
| 271 | $cls = PlayerTableMap::OM_CLASS; |
|
| 272 | /** @var Player $obj */ |
|
| 273 | $obj = new $cls(); |
|
| 274 | $col = $obj->hydrate($row, $offset, false, $indexType); |
|
| 275 | PlayerTableMap::addInstanceToPool($obj, $key); |
|
| 276 | } |
|
| 277 | ||
| 278 | return array($obj, $col); |
|
| 279 | } |
|
| 280 | ||
| 281 | /** |
|
| 282 | * The returned array will contain objects of the default type or |
|