diff --git a/lib/DBIx/Class/Schema/Loader/RelBuilder.pm b/lib/DBIx/Class/Schema/Loader/RelBuilder.pm index 878a5b93a..8ae4559ec 100644 --- a/lib/DBIx/Class/Schema/Loader/RelBuilder.pm +++ b/lib/DBIx/Class/Schema/Loader/RelBuilder.pm @@ -411,7 +411,7 @@ sub generate_code { my %cond; @cond{@$remote_cols} = @$local_cols; - my ( $remote_relname, $local_relname, $remote_method ) = + my ( $local_relname, $remote_relname, $remote_method ) = $self->_relnames_and_method( $local_moniker, $rel, \%cond, $uniqs, \%counters ); my $local_method = 'belongs_to'; @@ -950,7 +950,7 @@ sub _relnames_and_method { } } - return ($remote_relname, $local_relname, $remote_method); + return ($local_relname, $remote_relname, $remote_method); } sub _rel_name_map { diff --git a/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_040.pm b/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_040.pm index 5909eed65..1910ce11a 100644 --- a/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_040.pm +++ b/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_040.pm @@ -33,7 +33,7 @@ sub _relnames_and_method { ($remote_relname) = $self->_inflect_plural(lc $local_table); } - return ( $remote_relname, $local_relname, 'has_many' ); + return ( $local_relname, $remote_relname, 'has_many' ); } sub _remote_attrs { } diff --git a/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_05.pm b/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_05.pm index 90e61149f..c3581e7a2 100644 --- a/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_05.pm +++ b/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_05.pm @@ -61,7 +61,7 @@ sub _relnames_and_method { ($remote_relname) = $self->_inflect_singular($remote_relname_uninflected); } - return ( $remote_relname, $local_relname, $remote_method ); + return ( $local_relname, $remote_relname, $remote_method ); } =head1 NAME