Property getter in model doesn't work

My model code:


<?php


Yii::import('application.models._base.BaseAddress');


class Address extends BaseAddress {


    public static function model($className = __CLASS__) {

        return parent::model($className);

    }


    public function rules() {

        ...

    }

    

    public function getFullAddress() {

        return $this->address_text . (empty($this->comment) ? '' : ', ' . $this->comment);

    }


}



When I use $model->startAddress->getFullAddreess() it works fine.

$model->startAddress->fullAddreess gives CException property is not defined. Changing case of method name doesn’t help.

it should work, there is typo in your code that could be a problem




// change this

$model->startAddress->fullAddreess

// to 

$model->startAddress->fullAddress