Ignore:
Timestamp:
05/28/12 17:34:40 (12 years ago)
Author:
natan
Message:

Ticket #2786 - Permitir transações separadas ao persistir uma lista de objetos - Corrigido

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/api/controller.php

    r6132 r6328  
    180180        public static function rollback( $URI, $criteria = false ) 
    181181        { 
     182            if( isset( $URI['service'] ) ) 
     183                unset( self::$tx[ $URI['service'] ] ); 
     184 
     185            self::$txID--; 
     186 
    182187            return self::call( 'rollback', $URI, false, $criteria ); 
    183188        } 
     
    635640            catch( Exception $e ) 
    636641            { 
    637                 if( !self::fallback( $e ) ) 
     642                if( !self::fallback( $e, $URI ) ) 
    638643                    self::closeAll(); 
    639644 
     
    644649        } 
    645650 
    646         public static function fallback( $exception ) 
     651        public static function fallback( $exception, $URI ) 
    647652        { 
    648653            $code = $exception->getCode(); 
     
    651656                { 
    652657                        $fn = self::$fallbackHandlers[ $code ]; 
    653                         return $fn( $exception ); 
     658                        return $fn( $exception, $URI ); 
    654659                } 
    655660 
     
    762767            catch( Exception $e ) 
    763768            { 
    764                 if( !self::fallback( $e ) ) 
     769                if( !self::fallback( $e, $URI ) ) 
    765770                    self::closeAll(); 
    766771 
Note: See TracChangeset for help on using the changeset viewer.