package Reaction::InterfaceModel::Action::DBIC::Result::Update;
-use Reaction::InterfaceModel::Action;
-use Reaction::Types::DBIC;
+use aliased 'Reaction::InterfaceModel::Action::DBIC::Result';
+use Reaction::Types::DBIC 'Row';
use Reaction::Class;
-class Update is 'Reaction::InterfaceModel::Action', which {
+class Update is Result, which {
does 'Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques';
- has '+target_model' => (isa => 'DBIx::Class::Row');
-
implements BUILD => as {
my ($self) = @_;
my $tm = $self->target_model;
my $tm_attr = $tm->meta->find_attribute_by_name($name);
next unless ref $tm_attr;
my $tm_reader = $tm_attr->get_read_method;
- $self->$writer($tm->$tm_reader);
+ $self->$writer($tm->$tm_reader) if defined($tm->$tm_reader);
}
};