DBICx-MaterializedPath
view release on metacpan or search on metacpan
lib/DBICx/MaterializedPath.pm view on Meta::CPAN
return $materialized_path; # For good measure.
}
sub insert :method {
my $self = shift;
$self->next::method(@_);
$self->set_materialized_path;
$self->update;
}
sub update :method {
my $self = shift;
my %to_update = $self->get_dirty_columns;
my $parent_column = $self->parent_column;
$self->next::method(@_);
return $self unless $to_update{$parent_column};
# This should be configurable as a transaction I think. 321
$self->set_materialized_path;
for my $descendant ( $self->grandchildren )
{
$descendant->set_materialized_path;
( run in 0.708 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )