I've used moniker_map in a few places, but before I realised I could use
it, I named a table cached_v_a_t_numbers to get the same effect :)

Do look at the inflect_{singular,plural} attributes too, if you're tweaking
the result source names you may want to tweak some of the accessor /
relation names as well.



On 13 February 2013 17:45, Dagfinn Ilmari Mannsåker <ilm...@ilmari.org>wrote:

> Dag-Erling Smørgrav <d...@des.no> writes:
>
> > I have a sneaking suspicion that this is a FAQ, but I can't find the
> > answer anywhere.
> >
> > I have a schema where some of the table names are acronyms, and I'd like
> > dbicdump to create classes with all-caps names for those tables.  For
> > instance, I have a table named "mac", and I'd like the class to be named
> > MAC rather than Mac.  Is there a way to force the class name, perhaps by
> > passing a hash to DBIx::Schema::Loader that maps the (case insensitive)
> > table name to a (case sensitive) class name?
>
> This is exactly what the moniker_map option is for:
>
> <https://metacpan.org/module/DBIx::Class::Schema::Loader::Base#moniker_map
> >
>
> --
> "The surreality of the universe tends towards a maximum" -- Skud's Law
> "Never formulate a law or axiom that you're not prepared to live with
>  the consequences of."                              -- Skud's Meta-Law
>
>
> _______________________________________________
> 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/dbix-class@lists.scsys.co.uk
>
_______________________________________________
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/dbix-class@lists.scsys.co.uk

Reply via email to