my $colnames = q{_} . join(q{_}, @$local_cols);
$remote_relname .= $colnames if keys %cond > 1;
$local_relname = $self->_multi_rel_local_relname(
- $local_table, $local_cols
+ $remote_class, $local_table, $local_cols
);
} else {
$local_relname = $self->_inflect_plural(lc $local_table);
}
sub _multi_rel_local_relname {
- my ($self, $local_table, $local_cols) = @_;
+ my ($self, $remote_class, $local_table, $local_cols) = @_;
my $colnames = q{_} . join(q{_}, @$local_cols);
my $old_relname = #< TODO: remove me after 0.05003 release
# TODO: remove me after 0.05003 release
$old_relname = $self->_inflect_plural( $old_relname );
- warn __PACKAGE__." $VERSION: warning, stripping trailing _id from ${local_table} relation '$old_relname', renaming to '$local_relname'. This behavior is new as of 0.05003.\n"
+ warn __PACKAGE__." $VERSION: warning, stripping trailing _id from ${remote_class} relation '$old_relname', renaming to '$local_relname'. This behavior is new as of 0.05003.\n"
if $stripped_id;
return $local_relname;
}
sub _multi_rel_local_relname {
- my ($self, $local_table, $local_cols) = @_;
+ my ($self, $remote_class, $local_table, $local_cols) = @_;
my $colnames = q{_} . join(q{_}, @$local_cols);
my $local_relname = $self->_inflect_plural( lc($local_table) . $colnames );
sub run_tests {
my $self = shift;
- plan tests => 88;
+ plan tests => 89;
$self->create();
isa_ok( $obj13->id, $class12 );
isa_ok( $obj13->loader_test12, $class12);
isa_ok( $obj13->dat, $class12);
+
+ my $obj12 = $rsobj12->find(1);
+ isa_ok( $obj12->loader_test13_ids, "DBIx::Class::ResultSet" );
}
SKIP: {
sub run_tests {
my $self = shift;
- plan tests => 155 + ($self->{extra}->{count} || 0);
+ plan tests => 156 + ($self->{extra}->{count} || 0);
$self->create();
isa_ok( $obj13->id, $class12 );
isa_ok( $obj13->loader_test12, $class12);
isa_ok( $obj13->dat, $class12);
+
+ my $obj12 = $rsobj12->find(1);
+ isa_ok( $obj12->loader_test13, $class13 );
}
SKIP: {