Re-selects the row from the database, losing any changes that had
been made.
+This method can also be used to refresh from storage, retrieving any
+changes made since the row was last read from storage.
+
=cut
sub discard_changes {
sub ident_condition {
my ($self, $alias) = @_;
my %cond;
- $cond{(defined $alias ? "${alias}.$_" : $_)} = $self->get_column($_)
- for $self->primary_columns;
+ my $prefix = defined $alias ? $alias.'.' : '';
+ $cond{$prefix.$_} = $self->get_column($_) for $self->primary_columns;
return \%cond;
}