[Dbix-class] Use of ->resultset mandatory?
Shane McEwan
linenoise at virtualdoughnutland.com
Mon Oct 30 23:32:36 GMT 2006
On Mon, 2006-10-30 at 21:43 +0000, Steven Mackenzie wrote:
> In my quest to avoid typing resultset(''), is there a reason why I can't
> have source_name create accessors in the $shema object, eg,
> $schema->MyBest->search;
I'm also new to DBIx::Class after using CDBI for a couple of years and I
had the exact same question.
I saved myself some typing by doing:
my $MyBest = $schema->resultset('MyBest');
$MyBest->search();
It seems to work but I've only done very basic stuff so far. Please let
me know if what I'm doing is stupid and will break when I try to do
something more complicated.
I still haven't got my head around exactly what a result set is and what
I can do with it. I subscribed to the mailing list to hopefully see some
examples of what other people are doing. So far this is the first
question I've been able to understand. :-)
As I learn more I may be tempted to write a CDBI to DBIC transition
guide.
Shane.
More information about the Dbix-class
mailing list