Changeset 7d602a7b80b217f0f5a162bde18ef9848faf32f2 in xas-model


Ignore:
Timestamp:
02/26/15 13:48:50 (5 years ago)
Author:
Kevin L. Esteb <kevin@…>
Branches:
master
Children:
ec669f7d855f211d1a774ab3048a0a59d4356f13
Parents:
0faedb747c77b2da4f5aa97abc381a4984c861a7
git-author:
Kevin L. Esteb <kevin@…> (02/26/15 13:48:50)
git-committer:
Kevin L. Esteb <kevin@…> (02/26/15 13:48:50)
Message:

Fixed a problem with delete_records()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/XAS/Model/DBM.pm

    r0faedb747c77b2da4f5aa97abc381a4984c861a7 r7d602a7b80b217f0f5a162bde18ef9848faf32f2  
    99  mixins  => 'create find search search_like find_or_create update_or_create 
    1010              update_or_new count populate read_record create_record  
    11               delete_record update_record load_records', 
     11              delete_record update_record load_records delete_records', 
    1212; 
    1313 
     
    146146    $schema->txn_do(sub {  
    147147 
    148         if (my $rs = $class->search($schema, @_)) { 
    149  
    150             while (my $row = $rs->next) { 
    151  
    152                 $row->delete(); 
    153  
    154             } 
    155  
    156         } 
     148        $schema->resultset( $class->table_name )->search( @_ )->delete_all; 
    157149 
    158150    }); 
Note: See TracChangeset for help on using the changeset viewer.