override belongto parent appmodel cakephp
snippet in php

override belongto parent appmodel cakephp

user6193

// -------------------------------------------------------------
// ------------ Override belongto parent appmodel --------------
// -------------------------------------------------------------
public function __construct($id = false, $table = null, $ds = null) {
    $parent = get_parent_class($this);
    $this->_mergeVars(array('belongsTo'), $parent);	// override belongto parent appmodel

    parent::__construct($id, $table, $ds);
}

join cakphp

user8998

'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 . '\'',
            )
        ),
    ),