Пример #1
0
 protected function _join($association, $type, $resolve_table_model = TRUE)
 {
     $join_key = is_array($association) ? join(':', $association) : $association;
     if (!isset($this->_join[$join_key])) {
         $join = Jam_Query_Builder::resolve_join($association, $type, $this->meta()->model(), $resolve_table_model);
         $this->_join[$join_key] = $join;
         return $join;
     } else {
         return $this->_join[$join_key];
     }
 }
Пример #2
0
 public function join_table($model, $type = NULL)
 {
     $join = Jam_Query_Builder::resolve_join($model, $type, $this->_table, FALSE)->end($this);
     $this->_joins[] = $join;
     return $join;
 }