[Catalyst] DBIC::Schema issue - out of ideas [ more info ]

kakimoto at tpg.com.au kakimoto at tpg.com.au
Wed Feb 18 11:29:56 GMT 2009


Hello, Dermot,

   Replies are as per below.

Quoting Dermot <paikkos at googlemail.com>:

" myApp_create.pl model myAppDB DBIC::Schema myApp::Schema  
create=static  dbi:Pg:dbname=myApp  myAdminUser mypassword"

> Your command says "Create a schema under the directory 'myAppDB', so
> they should be under
> 
> lib/myApp/myAppDB/


I beg to differ. The files are created within
myApp/lib/myApp/Schema and myApp/lib/myApp/Schema.pm





> 
> They probably are there as *.new (as Alejandro says)

Nope.


> 
> This whole issue can be quickly resolved if you can search/grep
> through the files in ~/Controller/* and/or ~/myAppDB/*  to find out
> how is trying to use "Listing.pm". Does you this table exist in you
> DB?
 

Yes the table exists.
I ran the myApp_create.pl script again outside of the 'scripts'
directory and running myApp_server.pl is ok except I  got another error
(small one).

I found that when I add relations into the ORM files (ie. Listings.pm,
Users.pm), I was using the notation of 

__PACKAGE__->has_many( 'listings' => 'myAppDB::Listings', 'manager_id');


That should be right because 'myAppDB' to my understanding, is how
Catalyst will recognise my schema (as defined in the myApp_create.pl
call above).

I know logically, it should be 'myApp::Schema::Listings' as that package
can be found in lib/myApp/Schema/Listings.pm
 
'
Very confused here.

Can anyone please enlighten me??





More information about the Catalyst mailing list