[Dbix-class] Join and prefetch support now in trunk

Matt S Trout dbix-class at trout.me.uk
Fri Sep 9 11:49:45 CEST 2005


(from the tests)

$rs = DBICTest::CD->search(
           { 'year' => 2001, 'artist.name' => 'Caterwauler McCrae' },
           { join => 'artist' });

$rs = DBICTest::CD->search(
           { 'artist.name' => 'We Are Goth',
             'liner_notes.notes' => 'Kill Yourself!' },
           { join => [ qw/artist liner_notes/ ] });

$rs = DBICTest::CD->search(
           { 'artist.name' => 'Caterwauler McCrae' },
           { prefetch => [ qw/artist liner_notes/ ],
             order_by => 'me.cdid' });

Sync it, kick it, break it, send me failing tests, please.

If somebody wants to do a CDBICompat module that duplicates the Sweet search
exactly, go for it. I may do at some point but I use code-generators for my
Sweet-calling code so switching the final syntax slightly is trivial to me,
and I think this is much cleaner than the Sweet way of doing things anyway.

-- 
     Matt S Trout       Specialists in perl consulting, web development, and
  Technical Director    UNIX/Linux systems architecture and automation. Mail
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

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



More information about the Dbix-class mailing list