[Bast-commits] r4083 -
DBIx-Class-Partitioned/1.000/trunk/lib/DBIx/Class
edenc at dev.catalyst.perl.org
edenc at dev.catalyst.perl.org
Thu Feb 14 17:40:07 GMT 2008
Author: edenc
Date: 2008-02-14 17:40:06 +0000 (Thu, 14 Feb 2008)
New Revision: 4083
Modified:
DBIx-Class-Partitioned/1.000/trunk/lib/DBIx/Class/Partitioned.pm
Log:
removed useless check on update
Modified: DBIx-Class-Partitioned/1.000/trunk/lib/DBIx/Class/Partitioned.pm
===================================================================
--- DBIx-Class-Partitioned/1.000/trunk/lib/DBIx/Class/Partitioned.pm 2008-02-14 16:24:45 UTC (rev 4082)
+++ DBIx-Class-Partitioned/1.000/trunk/lib/DBIx/Class/Partitioned.pm 2008-02-14 17:40:06 UTC (rev 4083)
@@ -58,7 +58,8 @@
}
sub update_partitioned {
- my ( $self, $to_update ) = @_;
+ my ( $self ) = @_;
+ $self->discard_changes;
my $partition =
$self->result_source->partition( $self->_current_partition );
$partition->storage->update( $partition, { $self->get_columns },
@@ -99,7 +100,6 @@
my $self = shift;
local $self->result_source->schema->{restricting_object};
- my %to_update = $self->get_dirty_columns;
$self->next::method(@_);
my $old_part = $self->_current_partition;
my $new_part = $self->_partition_name;
@@ -111,7 +111,7 @@
}
else {
if ( $self->in_partition ) {
- $self->update_partitioned if keys %to_update;
+ $self->update_partitioned;
}
else {
$self->insert_partitioned;
More information about the Bast-commits
mailing list