@@ 543-556 (lines=14) @@ | ||
540 | /** |
|
541 | * Override the native php clone function for TDBMObjects |
|
542 | */ |
|
543 | public function __clone(){ |
|
544 | $this->_dbLoadIfNotLoaded(); |
|
545 | //First lets set the status to new (to enter the save function) |
|
546 | $this->status = TDBMObjectStateEnum::STATE_NEW; |
|
547 | ||
548 | // Add the current TDBMObject to the save object list |
|
549 | $this->tdbmService->_addToToSaveObjectList($this); |
|
550 | ||
551 | //Now unset the PK from the row |
|
552 | $pk_array = $this->tdbmService->getPrimaryKeyColumns($this->dbTableName); |
|
553 | foreach ($pk_array as $pk) { |
|
554 | $this->dbRow[$pk] = null; |
|
555 | } |
|
556 | } |
|
557 | ||
558 | /** |
|
559 | * Returns raw database rows. |
@@ 329-342 (lines=14) @@ | ||
326 | /** |
|
327 | * Override the native php clone function for TDBMObjects |
|
328 | */ |
|
329 | public function __clone(){ |
|
330 | $this->_dbLoadIfNotLoaded(); |
|
331 | //First lets set the status to new (to enter the save function) |
|
332 | $this->status = TDBMObjectStateEnum::STATE_NEW; |
|
333 | ||
334 | // Add the current TDBMObject to the save object list |
|
335 | $this->tdbmService->_addToToSaveObjectList($this); |
|
336 | ||
337 | //Now unset the PK from the row |
|
338 | $pk_array = $this->tdbmService->getPrimaryKeyColumns($this->dbTableName); |
|
339 | foreach ($pk_array as $pk) { |
|
340 | $this->dbRow[$pk] = null; |
|
341 | } |
|
342 | } |
|
343 | ||
344 | /** |
|
345 | * Returns raw database row. |