<?php

/**
 * Discount
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @package    sf
 * @subpackage model
 * @author     Atma
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
class Discount extends BaseDiscount
{
    
    public function save(Doctrine_Connection $conn = null) {
        $save = parent::save($conn);
        if ($this->getUrl() == '') {
        	$rand = Page::generate_rand_string(20);
            $this->setUrl($rand);
        }
        return parent::save($conn);
    }

}
