Changeset 2629

Show
Ignore:
Timestamp:
06/23/08 05:47:47 (20 months ago)
Author:
fumiakiy
Message:

Save and execute existing column mutator. This is required for MS SQL Server driver. BugId:80269

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-40/lib/MT/ObjectDriver/Driver/DBI.pm

    r2625 r2629  
    384384 
    385385        if (defined($terms)) { 
     386            my $mutator = $stmt->column_mutator; 
    386387            $stmt->column_mutator(sub { 
    387388                my ($col) = @_; 
     
    389390                if ( my $alias = $orig_args->{alias} ) { 
    390391                    $db_col = "$alias.$db_col"; 
     392                } 
     393                if ( $mutator && 'CODE' eq ref($mutator) ) { 
     394                    $db_col = $mutator->($db_col); 
    391395                } 
    392396                return $db_col;