my %to_update = $self->get_dirty_columns
or return $self;
- $self->throw_exception( "Not in database" ) unless $self->in_storage;
+ $self->throw_exception(
+ 'Result object not marked in_storage: an update() operation is not possible'
+ ) unless $self->in_storage;
my $rows = $self->result_source->schema->storage->update(
$self->result_source, \%to_update, $self->_storage_ident_condition
sub delete {
my $self = shift;
if (ref $self) {
- $self->throw_exception( "Not in database" ) unless $self->in_storage;
+ $self->throw_exception(
+ 'Result object not marked in_storage: a delete() operation is not possible'
+ ) unless $self->in_storage;
$self->result_source->schema->storage->delete(
$self->result_source, $self->_storage_ident_condition