public function onBeforeWrite()
 {
     parent::onBeforeWrite();
     $quickTags = FlickrTag::CreateOrFindTags($this->QuickTags);
     $this->FlickrTags()->addMany($quickTags);
     if ($this->ID && $this->FlickrPhotos()->count() > 0) {
         if ($this->Title == '') {
             $this->Title = $this->FlickrPhotos()->first()->TakenAt . ' - ' . $this->FlickrPhotos()->last()->TakenAt;
         }
     } else {
         $this->Virginal = true;
     }
 }
 function onBeforeWrite()
 {
     parent::onBeforeWrite();
     $quickTags = FlickrTag::CreateOrFindTags($this->QuickTags);
     $this->FlickrTags()->addMany($quickTags);
     if ($this->LargeWidth > 0) {
         $this->AspectRatio = $this->LargeHeight / $this->LargeWidth;
     }
     if (!$this->KeepClean) {
         $this->IsDirty = true;
     } else {
         $this->IsDirty = false;
     }
 }