Steven Mackenzie wrote:
> Matt S Trout wrote:
> 
>> Steven Mackenzie wrote:
>>  
>>
>>> Hello,
>>>
>>> The DBIxC manual pages use a CD collection DB schema for their example
>>> snippets. Can I download a real copy of that from somewhere?
>>>
>>> Maybe as a SQLite v3 db file, or as a sql script for MS SQL?
>>>    
>>>
>> If you look in the DBIC dist, there's a t/lib/sqlite.sql that deploys our 
>> testing schema and after running make test you'll find a DBIxClass.db sqlite 
>> db file in t/var
>>
>> That any good?
>>  
>>
> Looks like it would have been ideal -- BTW, I ran it as
> sqlite3 -init sqlite.sql DBIxClass.db
> is that what you intended?

make test will create and populate the database itself, so that won't achieve 
much except for wiping out the sample data.

> I was having trouble getting a trivial DBIx::Class app to run, but I've
> cracked it now (If you're defining your table classes in the same file
> as your schema class, you don't want to call load_classes, call
> register_class instead).

yeah. Defining multiple classes in one file is Bad Perl Style and often 
requires some gymnastics to make work - relationship inference will be iffy as 
well, you'll probably have to specify join conditions for everything.

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to