To add an C<OR>ed condition, use an arrayref of hashrefs. See the
L<SQL::Abstract> documentation for more details.
-In addition to standard result set attributes, the following attributes are also valid:
+In addition to the
+L<standard ResultSet attributes|DBIx::Class::ResultSet/ATTRIBUTES>,
+the following attributes are also valid:
=over 4
if ($cond eq $DBIx::Class::ResultSource::UNRESOLVABLE_CONDITION) {
my $reverse = $source->reverse_relationship_info($rel);
foreach my $rev_rel (keys %$reverse) {
- $attrs->{related_objects}{$rev_rel} = $self;
- Scalar::Util::weaken($attrs->{related_object}{$rev_rel});
+ if ($reverse->{$rev_rel}{attrs}{accessor} eq 'multi') {
+ $attrs->{related_objects}{$rev_rel} = [ $self ];
+ Scalar::Util::weaken($attrs->{related_object}{$rev_rel}[0]);
+ } else {
+ $attrs->{related_objects}{$rev_rel} = $self;
+ Scalar::Util::weaken($attrs->{related_object}{$rev_rel});
+ }
}
}
if (ref $cond eq 'ARRAY') {
$self->throw_exception( "Object $f_obj isn't a ".$f_class )
unless Scalar::Util::blessed($f_obj) and $f_obj->isa($f_class);
}
+# print STDERR "set_from_related: ", $rel, Data::Dumper::Dumper({$f_obj->get_columns});
$self->set_columns(
$self->result_source->resolve_condition(
$rel_obj->{cond}, $f_obj, $rel));
+# print STDERR "set_: ", Data::Dumper::Dumper({$self->get_columns});
return 1;
}