1 package DBIx::Class::Schema::Loader::RelBuilder::Compat::v0_040;
7 use base 'DBIx::Class::Schema::Loader::RelBuilder';
10 my ($self, $local_moniker, $local_relname, $local_cols, $uniqs) = @_;
12 return ('has_many', $local_relname);
18 my ($self, $remote_table, $cond) = @_;
21 # for single-column case, set the remote relname to the column
22 # name, to make filter accessors work
23 if(scalar keys %{$cond} == 1) {
24 $remote_relname = $self->_inflect_singular(values %{$cond});
27 $remote_relname = $self->_inflect_singular(lc $remote_table);
30 return $remote_relname;
33 sub _multi_rel_local_relname {
34 my ($self, $remote_class, $local_table, $local_cols) = @_;
36 my $colnames = q{_} . join(q{_}, @$local_cols);
37 my $local_relname = $self->_inflect_plural( lc($local_table) . $colnames );
39 return $local_relname;
46 DBIx::Class::Schema::Loader::RelBuilder::Compat::v0_040 - RelBuilder for
47 compatibility with DBIx::Class::Schema::Loader version 0.04006
51 See L<DBIx::Class::Schema::Loader::Base/naming>.