2009/2/18 <kakim...@tpg.com.au>: >> lib/myApp/myAppDB/ > > I beg to differ. The files are created within > myApp/lib/myApp/Schema and myApp/lib/myApp/Schema.pm
What not Schema/myAppDB? All of these question really belong on the DBIc mailing list which is here: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class > 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?? I'm going to do something horrid and point you at the documentation: http://search.cpan.org/~ribasushi/DBIx-Class-0.08012/lib/DBIx/Class/Relationship.pm#has_many and http://search.cpan.org/~ribasushi/DBIx-Class-0.08012/lib/DBIx/Class/Schema.pm You created you Schema with DBIx::Class::Schema. If you had used myApp_create model myApp::Model, your model would reside under the model directory. Instead you a a Schema.pm file the points resolves everything to the files with the the model name you handed to it. I not expert enough to say much more and I fear I might give incorrect information if I try and summarise why you use 'myAppDB::Listing' and not the full path (i suspect the latter woudl work though. Good luck, Dp.. _______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/