Do you know where your variables are? | |
PerlMonks |
DBIx::Class : stop changing table, column, relationship namesby bliako (Monsignor) |
on Feb 22, 2023 at 19:50 UTC ( [id://11150536]=perlquestion: print w/replies, xml ) | Need Help?? |
bliako has asked for the wisdom of the Perl Monks concerning the following question: I am a bit confused as to how to tell DBIx::Class (version 0.082843 on SQLite) not to change ANY table, column, relationship names. The whole lot. I found the naming key in the parameters of https://metacpan.org/pod/DBIx::Class::Schema::Loader#make_schema_at (version 0.07051) to take values like:
This works (AFAICS) except when it creates relationships wtth CamelNames it breaks their hump: camel_names. Surely this is animal cruelty. I tried using all available options for relationships => v4, v5, v6, v7, v8, preserve (See https://metacpan.org/pod/DBIx::Class::Schema::Loader::Base#naming). Additionally, on trying the different relationships => v4, v5, v6, v7, v8, current there are serious changes in the relationships code other than just the names. For example on 'v4' I get:
and when using 'current' I get:
Which, AFAICT, it not only changes the naming conventions but changes the logic! My DB schema is dictated by JSON from a REST API which I have no control. They use CamelNames. I want to replicate EXACTLY that. I do not want:
So, simple question: how can DBIx::Class et.al. not chnage any names in my SQL create-tables. Not a single iota. bw, bliako
Back to
Seekers of Perl Wisdom
|
|