Example #1
0
 public function __unset($column)
 {
     if (!isset($this->original)) {
         $this->original = $this->object;
     }
     return parent::__unset($column);
 }
Example #2
0
 /**
  * Override the ORM clear method to clean up errors and identifier tracking.
  */
 public function clear()
 {
     parent::clear();
     $this->errors = array();
     $this->identifiers = array('website_id' => null, 'survey_id' => null);
 }
Example #3
0
 public function save()
 {
     model_cache::clear();
     return parent::save();
 }
Example #4
0
 /**
  * Proxy method to Database field_data.
  *
  * @chainable
  * @param   string  SQL query to clear
  * @return  ORM
  */
 public function clear_cache($sql = NULL)
 {
     // Proxy to database
     $this->db->clear_cache($sql);
     self::$column_cache = array();
     return $this;
 }
Example #5
0
 /**
  * Find ALL objects
  * @developer Brandon Hansen
  * @date May 25, 2010
  */
 public function find_all_no_limit()
 {
     return parent::find_all();
 }
Example #6
0
 public function save()
 {
     model_cache::clear($this->object_name, $this->{$this->primary_key}, $this->primary_key);
     return parent::save();
 }
Example #7
0
 /**
  * Delete method overload.  Make sure that users can't delete products not in their store
  * @developer Brandon Hansen
  * @date Oct 19, 2010
  */
 public function delete_all($ids = NULL)
 {
     if (array_key_exists('store_id', $this->table_columns)) {
         $this->where('store_id', Kohana::config('store.id'));
     }
     parent::delete_all($ids);
 }