Example #1
0
 /**
  * Refresh the row, pulling in the latest data from the DB.
  *
  * @return $this
  */
 private function refresh()
 {
     $pkey = array();
     foreach ($this->table->getPrimaryKey() as $column) {
         $pkey[] = $this->get($column);
     }
     $this->data = $this->table->findRowRefreshData($pkey);
     // Virtual fields need to load their values again after data refresh
     $this->virtualFieldsInitialized = array();
     return $this;
 }
Example #2
0
 /**
  * Refresh the row, pulling in the latest data from the DB.
  *
  * @return \Dewdrop\Db\Row
  */
 private function refresh()
 {
     $pkey = array();
     foreach ($this->table->getPrimaryKey() as $column) {
         $pkey[] = $this->get($column);
     }
     $this->data = $this->table->findRowRefreshData($pkey);
     return $this;
 }