<commit_before><?php

// auto-loading
Yii::setPathOfAlias('CcbrBranch', dirname(__FILE__));
Yii::import('CcbrBranch.*');

class CcbrBranch extends BaseCcbrBranch
{

    // Add your model-specific methods here. This file will not be overriden by gtc except you force it.
    public static function model($className = __CLASS__)
    {
        return parent::model($className);
    }

    public function init()
    {
        return parent::init();
    }

    public function getItemLabel()
    {
        if(empty($this->ccbrCcmp)){
            return (string)'';
        }
        return (string) $this->ccbrCcmp->ccmp_name . ' ' . $this->ccbr_name ;
    }

    public function behaviors() {
        return array_merge(
                parent::behaviors(), array(
             //auditrail       
            'LoggableBehavior' => array(
                'class' => 'LoggableBehavior'
            )
        ));
    }
    
    public function relations()
    {
        return array_merge(
            parent::relations(), array(
                'ccbrCcmp' => array(self::BELONGS_TO, 'CcmpCompanyAll', 'ccbr_ccmp_id'),
            )
        );
    }
    
    public function rules()
    {
        return array_merge(
            parent::rules()
        /* , array(
          array('column1, column2', 'rule1'),
          array('column3', 'rule2'),
          ) */
        );
    }

}<commit_msg>Added in beforeFind criteri  with ccbrCcmp<commit_after><?php

// auto-loading
Yii::setPathOfAlias('CcbrBranch', dirname(__FILE__));
Yii::import('CcbrBranch.*');

class CcbrBranch extends BaseCcbrBranch
{

    // Add your model-specific methods here. This file will not be overriden by gtc except you force it.
    public static function model($className = __CLASS__)
    {
        return parent::model($className);
    }

    public function init()
    {
        return parent::init();
    }

    public function getItemLabel()
    {
        if(empty($this->ccbrCcmp)){
            return (string)'';
        }
        return (string) $this->ccbrCcmp->ccmp_name . ' ' . $this->ccbr_name ;
    }

    public function behaviors() {
        return array_merge(
                parent::behaviors(), array(
             //auditrail       
            'LoggableBehavior' => array(
                'class' => 'LoggableBehavior'
            )
        ));
    }
    
    public function relations()
    {
        return array_merge(
            parent::relations(), array(
                'ccbrCcmp' => array(self::BELONGS_TO, 'CcmpCompanyAll', 'ccbr_ccmp_id'),
            )
        );
    }
    
    public function rules()
    {
        return array_merge(
            parent::rules()
        /* , array(
          array('column1, column2', 'rule1'),
          array('column3', 'rule2'),
          ) */
        );
    }
    
    public function beforeFind(){

        $criteria = new CDbCriteria;
        $criteria->compare('ccmp_sys_ccmp_id', Yii::app()->sysCompany->getActiveCompany());
        $criteria->with = 'ccbrCcmp';
        $this->dbCriteria->mergeWith($criteria);
        
        parent::beforeFind();
    }   

}
{'fraction_non_alphanumeric': 0.13091026053393373, 'fraction_numerical': 0.0032164683177870698, 'mean_word_length': 1.8903345724907064, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '771731', 'n_tokens_mistral': 928, 'n_tokens_neox': 917, 'n_words': 183}