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

Reply via email to