final public function reload() {

		$app = Application::getInstance();
		$class = get_called_class();
		
		// properties to not reset
		$propertiesToSave = array('keyProperties', 'db', 'loadedFromDb', 'typeList', 'cache', 'errors');
		
		// save key from being unset
		$propertiesToSave = array_merge($propertiesToSave, $this->keyProperties);

		// unset all the other properties
		foreach ($this as $key => $value) {
			if (!in_array($key, $propertiesToSave)) {
				unset($this->$key);
			}
		}
		
		$this->cache  = array();
		$this->errors = array();
		
		$this->loadFromDb($this->getSqlKeyValues());
		
		// log the reload 
		$app->logEvent('Reloaded ' . $class . ' object with ' . $this->getKeyForEventlog());
		
	}
final public function reload() {

		$app = Application::getInstance();
		$class = get_called_class();
		
		// properties to not reset
		$propertiesToSave = array('keyProperties', 'db', 'loadedFromDb', 'typeList', 'cache', 'errors');
		
		// save key from being unset
		$propertiesToSave = array_merge($propertiesToSave, $this->keyProperties);

		// unset all the other properties
		foreach ($this as $key => $value) {
			if (!in_array($key, $propertiesToSave)) {
				unset($this->$key);
			}
		}
		
		$this->cache  = array();
		$this->errors = array();
		
		$this->loadFromDb($this->getSqlKeyValues());
		
		// log the reload 
		$app->logEvent('Reloaded ' . $class . ' object with ' . $this->getKeyForEventlog());
		
	}
final public function reload ( ) { $ app = Application :: getInstance ( ) ; $ class = get_called_class ( ) ; // properties to not reset $ propertiesToSave = array ( 'keyProperties' , 'db' , 'loadedFromDb' , 'typeList' , 'cache' , 'errors' ) ; // save key from being unset $ propertiesToSave = array_merge ( $ propertiesToSave , $ this -> keyProperties ) ; // unset all the other properties foreach ( $ this as $ key => $ value ) { if ( ! in_array ( $ key , $ propertiesToSave ) ) { unset ( $ this -> $ key ) ; } } $ this -> cache = array ( ) ; $ this -> errors = array ( ) ; $ this -> loadFromDb ( $ this -> getSqlKeyValues ( ) ) ; // log the reload  $ app -> logEvent ( 'Reloaded ' . $ class . ' object with ' . $ this -> getKeyForEventlog ( ) ) ; }
Update this object from the current DB record with same primary key.
Update this object from the current DB record with same primary key .