Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DBIx schema loader (dump schema using make_schema_at) wierd behaviour

8 views
Skip to first unread message

Rajeev Prasad

unread,
Aug 7, 2012, 11:29:19 PM8/7/12
to perl list, DBIx::Class user and developer list
Hello,
 
am I missing anything? when I dump schema of my database using schema loader's make_schema_at. Some .pm file names under Result corrosponding to folders have names chnaged! they do not match to table names!!
 
e.g. table name costlycookies shows up as Costlycooky.pm !!! another table cheapcookis show up as Cheapcooky.pm another table named els is showing up a El.pm !!!
 
when i cat these files the table names and other details are all good. But due to this 'wrong' .pm file naming I am getting this error in my code:
 
 DBIx::Class::Schema::resultset(): Can't find source for Costlycookies at /my/path/cgi-bin/myscript.pl line 53
 
line 53 in my code:...
 
 $coki_rs = $schema->resultset('Costlycookies')->search(....

 
 
why is this happening? before this fresh dumping operation, I changed the indexed key from general indexed key to primary index key on almost all tables, but the old table's *.pm file names still look good.

Robert Wohlfarth

unread,
Aug 8, 2012, 10:26:22 AM8/8/12
to perl list
> --
> To unsubscribe, e-mail: beginners-...@perl.org
> For additional commands, e-mail: beginne...@perl.org
> http://learn.perl.org/
>
>
>

Take a look at the documentation for DBIx::Class::Schema::Loader::Base. It
explains how *make_schema_at* renames tables into classes.

http://search.cpan.org/~rkitover/DBIx-Class-Schema-Loader-0.07025/lib/DBIx/Class/Schema/Loader/Base.pm#naming


--
Robert Wohlfarth
0 new messages