public function updateDefaultsFromObject()
 {
     parent::updateDefaultsFromObject();
     if (!$this->isNew) {
         $hash = array();
         $title = array();
         $ids = array();
         $productId = $this->getObject()->getId();
         $stm = Propel::getConnection()->prepare('
                 SELECT
                     img.content_hash,
                     img.name_file_for_page,
                     img.id
                 FROM
                     images_has_product ihprod
                 INNER JOIN images img ON img.id = ihprod.images_id
                 WHERE
                     ihprod.product_id = :id
              ');
         $stm->bindParam(':id', $productId);
         $stm->execute();
         $album = $stm->fetchAll(PDO::FETCH_NUM);
         if (is_array($album)) {
             foreach ($album as $item) {
                 $hash[] = $item[0];
                 $title[] = $item[1];
                 $ids[] = $item[2];
             }
             $this->setDefault('images', array('current' => array('hash' => $hash, 'title' => $title, 'ids' => $ids)));
         }
     }
 }