public function makeItDefault()
    {
        AddressQuery::create()->filterByCustomerId($this->getCustomerId())
            ->update(array('IsDefault' => '0'));

        $this->setIsDefault(1);
        $this->save();
    }
public function makeItDefault()
    {
        AddressQuery::create()->filterByCustomerId($this->getCustomerId())
            ->update(array('IsDefault' => '0'));

        $this->setIsDefault(1);
        $this->save();
    }
public function makeItDefault ( ) { AddressQuery :: create ( ) -> filterByCustomerId ( $ this -> getCustomerId ( ) ) -> update ( array ( 'IsDefault' => '0' ) ) ; $ this -> setIsDefault ( 1 ) ; $ this -> save ( ) ; }
put the the current address as default one
put the the current address as default one