exists $self->column_info($key)->{_filter_info}
) {
$self->set_filtered_column($key, delete $attrs->{$key});
- $self->get_column($key);
+
+ # FIXME update() reaches directly into the object-hash
+ # and we may *not* have a filtered value there - thus
+ # the void-ctx filter-trigger
+ $self->get_column($key) unless exists $self->{_column_data}{$key};
}
}
=head1 SYNOPSIS
- # In your result classes
+In your Schema or DB class add "FilterColumn" to the top of the component list.
+
+ __PACKAGE__->load_components(qw( FilterColumn ... ));
+
+Set up filters for the columns you want to convert.
+
__PACKAGE__->filter_column( money => {
filter_to_storage => 'to_pennies',
filter_from_storage => 'from_pennies',
1;
+
=head1 DESCRIPTION
This component is meant to be a more powerful, but less DWIM-y,