lgn8412 has asked for the wisdom of the Perl Monks concerning the following question:
Hi, this a matter that has been giving me problems lately on my internship, I need to create the schemas from a database model that has poorly named tables, so it has problems with the moniker mapping, my interest in this is that I don't want to use singularization of names at all, and just leave things as they are, I'm currently using this command to create the model:
perl script/nombreapp_create.pl model DB DBIC::Schema App::Schema create=static 'dbi:Oracle:sid=DATA;host=xxx.xxx.xxx.xxx;port=1521' 'user' 'password' '{AutoCommit => 0 }' 'naming => { relationships => 'v4', monikers => 'v4' }'and it returns this as output:
Unable to load schema - chosen moniker/class naming style results in moniker clashes. Either change the naming style, or supply an explicit moniker_map: tables 'first_mickeymouse', 'first_mickeymouses' reduced to the same source moniker 'FirstMickeymouse'I don't really want to get into the trouble of creating a moniker map for this.. unless there isn't anything else I can do, I'd really appreciate any help, thanks in advance =)
Thanks to "Your Mother" for the help. I found the solution, my boss helped me with it, I'm going to post it here just for future reference to others =)
perl script/nameapp_create.pl model DB DBIC::Schema DATABASE::Schema create=static naming=v4 'dbi:Oracle:sid=DATA;host=xxx.xxx.xxx.xxx;port=1521' 'username' 'password' "{AutoCommit => 0}"I think it's the same if you want to make moniker maps, the thing was placing the naming flag in the right place
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI::Class::Loader using naming properly
by Your Mother (Archbishop) on Nov 29, 2010 at 15:09 UTC |