join cakephp code example
Example 1: override belongto parent appmodel cakephp
public function __construct($id = false, $table = null, $ds = null) {
$parent = get_parent_class($this);
$this->_mergeVars(array('belongsTo'), $parent);
parent::__construct($id, $table, $ds);
}
Example 2: join cakphp
'joins' => array(
array(
'table' => Environment::read('table_prefix') . 'image_type_languages',
'alias' => 'language',
'type' => 'INNER',
'conditions'=> array(
'ImageType.id = language.image_type_id',
'language.alias = \'' . $language . '\'',
)
),
),