- update() on row not in_storage no longer throws an exception
if there are no dirty columns to update (fixes cascaded update
annoyances)
- - Update Schema::Versioned to respect hashref style of connection_info
+ - Update Schema::Versioned to respect hashref style of
+ connection_info
+ - Do not recreate the same related object twice during MultiCreate
+ (solves the problem of orphaned IC::FS files)
* Misc
- Add a warning to load_namespaces if a class in ResultSet/
my $reverse = $source->reverse_relationship_info($relname);
foreach my $obj (@cands) {
$obj->set_from_related($_, $self) for keys %$reverse;
- my $them = { %{$obj->{_relationship_data} || {} }, $obj->get_inflated_columns };
if ($self->__their_pk_needs_us($relname)) {
if (exists $self->{_ignore_at_insert}{$relname}) {
MULTICREATE_DEBUG and warn "MC $self skipping post-insert on $relname";
- } else {
- MULTICREATE_DEBUG and warn "MC $self re-creating $relname $obj";
- my $re = $self->result_source
- ->related_source($relname)
- ->resultset
- ->create($them);
- %{$obj} = %{$re};
- MULTICREATE_DEBUG and warn "MC $self new $relname $obj";
+ }
+ else {
+ MULTICREATE_DEBUG and warn "MC $self inserting $relname $obj";
+ $obj->insert;
}
} else {
MULTICREATE_DEBUG and warn "MC $self post-inserting $obj";