3 class Panorama
extends ActiveRecord
5 var $has_one = array('thumbnail' => array('dependent' => true,'class_name' => 'Thumbnail', 'foreign_key'=>'photo_id','condition'=>"owner = 'Panorama'"));
6 var $belongsTo = 'property';
10 if($this->thumbnail
->getType() == 'Thumnail'){
11 $this->thumbnail
->owner
= 'Panorama';