method is used internally by L</set_column> which you should probably
be using.
-This is the lowest level at which data is set on a result object,
+This is the lowest level at which data is set on a result object;
extend this method to catch all data setting methods.
=cut
=cut
sub get_from_storage {
- my $self = shift @_;
- my $attrs = shift @_;
- my $resultset = $self->result_source->resultset;
+ my $self = shift;
- if(defined $attrs) {
- $resultset = $resultset->search(undef, $attrs);
- }
-
- return $resultset->find($self->_storage_ident_condition);
+ # with or without attrs?
+ (
+ defined( $_[0] )
+ ? $self->result_source->resultset->search_rs( undef, $_[0] )
+ : $self->result_source->resultset
+ )->find(
+ $self->_storage_ident_condition
+ );
}
=head2 discard_changes