I'm looking for feedback on a patch to DBIx::Class::Schema::Loader.
If people like it, I would like to see this added to the next release.

The patch adds a relationship_name_map argument to
DBIx::Class::Schema::Loader::Base to give people control over what
names will be given to relationships.  A comment in the source
suggests that this was supposed to be implemented, but that never
seems to have happened.

As implemented, this argument can be a coderef or a hashref.  If it is
a hashref, you can do things like:

  {
      bar => "baz",
      Foo => {
          bar => "blat",
      },
  }

which will cause relationships that would have been called bar to be
called baz, except in class Foo where it will be called blat instead.

If a coderef you are given the moniker for the class being built, the
name of the relationship accessor, and then a hashref with more
detailed information.

This patch includes documentation and unit tests.

Attachment: dbix-class-schema-loader.patch
Description: Binary data

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to