@@ 553-566 (lines=14) @@ | ||
550 | /** |
|
551 | * Override the native php clone function for TDBMObjects |
|
552 | */ |
|
553 | public function __clone(){ |
|
554 | $this->_dbLoadIfNotLoaded(); |
|
555 | //First lets set the status to new (to enter the save function) |
|
556 | $this->status = TDBMObjectStateEnum::STATE_NEW; |
|
557 | ||
558 | // Add the current TDBMObject to the save object list |
|
559 | $this->tdbmService->_addToToSaveObjectList($this); |
|
560 | ||
561 | //Now unset the PK from the row |
|
562 | $pk_array = $this->tdbmService->getPrimaryKeyColumns($this->dbTableName); |
|
563 | foreach ($pk_array as $pk) { |
|
564 | $this->dbRow[$pk] = null; |
|
565 | } |
|
566 | } |
|
567 | ||
568 | /** |
|
569 | * Returns raw database rows. |
@@ 340-353 (lines=14) @@ | ||
337 | /** |
|
338 | * Override the native php clone function for TDBMObjects |
|
339 | */ |
|
340 | public function __clone(){ |
|
341 | $this->_dbLoadIfNotLoaded(); |
|
342 | //First lets set the status to new (to enter the save function) |
|
343 | $this->status = TDBMObjectStateEnum::STATE_NEW; |
|
344 | ||
345 | // Add the current TDBMObject to the save object list |
|
346 | $this->tdbmService->_addToToSaveObjectList($this); |
|
347 | ||
348 | //Now unset the PK from the row |
|
349 | $pk_array = $this->tdbmService->getPrimaryKeyColumns($this->dbTableName); |
|
350 | foreach ($pk_array as $pk) { |
|
351 | $this->dbRow[$pk] = null; |
|
352 | } |
|
353 | } |
|
354 | ||
355 | /** |
|
356 | * Returns raw database row. |