for my $name ( keys %$updates ) {
my $source = $self->result_source;
if ( $columns_by_accessor{$name}
for my $name ( keys %$updates ) {
my $source = $self->result_source;
if ( $columns_by_accessor{$name}
if ( !scalar @missing ) {
$object = $self->find( \%columns, { key => 'primary' } );
}
if ( !scalar @missing ) {
$object = $self->find( \%columns, { key => 'primary' } );
}
my $info = $object->result_source->relationship_info($name);
$self->_update_relation( $name, $updates, $object, $info );
}
my $info = $object->result_source->relationship_info($name);
$self->_update_relation( $name, $updates, $object, $info );
}
# don't allow insert to recurse to related objects - we do the recursion ourselves
# $object->{_rel_in_storage} = 1;
# don't allow insert to recurse to related objects - we do the recursion ourselves
# $object->{_rel_in_storage} = 1;
You can feed the ->create method with a recursive datastructure and have the related records
created. Unfortunately you cannot do a similar thing with update_or_create - this module
You can feed the ->create method with a recursive datastructure and have the related records
created. Unfortunately you cannot do a similar thing with update_or_create - this module
For a many_to_many (pseudo) relation you can supply a list of primary keys
from the other table - and it will link the record at hand to those and
only those records identified by them. This is convenient for handling web
forms with check boxes (or a SELECT box with multiple choice) that let you
For a many_to_many (pseudo) relation you can supply a list of primary keys
from the other table - and it will link the record at hand to those and
only those records identified by them. This is convenient for handling web
forms with check boxes (or a SELECT box with multiple choice) that let you