$query = $this->CI->db->get($this->foreign_table); return $query->result_array();
$this->CI->db->from($this->foreign_table); foreach($this->params['access_restriction'] as $k=>$v){ $this->CI->db->where($k,$v); } return $query->get()->result_array();
second_table: class: ManyToMany params: ... access_restriction: field: value