Fixing content type ordering when content_type is not defined.
[akelos.git] / test / fixtures / app / models / panorama.php
blob5395a7d47581040017465f4c6e1c5c2033c62449
1 <?php
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';
8 function beforeSave()
10 if($this->thumbnail->getType() == 'Thumnail'){
11 $this->thumbnail->owner = 'Panorama';
13 return true;