This email concerns http://search.cpan.org/~ribasushi/DBIx-Class-0.08120/lib/DBIx/Class/Manual/Cookbook.pod#Arbitrary_SQL_through_a_custom_ResultSource
The first thing is that the ->table ->add_columns line is commented out: # ->table, ->add_columns, etc. And it therefore seemed optional. But if you dont use ->table() you get some odd errors. Next, if you want to find out how to use ->table(), common sense would point you to DBIx::Class::Core docs ( http://search.cpan.org/~ribasushi/DBIx-Class-0.08120/lib/DBIx/Class/Core.pm ) but that is a top-level doc file with several sub files, none of which obviously point to a ->table command It turns out that the argument to ->table() is a view name. Now, most importantly, I think this section should advise people to create views in the database and have the ::Loader create a result class for them unless they enjoy manually typing in column defs for add_columns... there is no tool which selects a series of result classes and the columns in them, and merges them into an add_columns statement is there? Otherwise you have to manually copy/paste column defs from all the tables you are joining. _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[email protected]
