On Mon, May 21, 2007 at 08:06:48PM +0100, Richard Jones wrote:
> I also think the problem is that I haven't managed to find a way to
> define a relationship in Schema::Foo to a table removed by 2 levels:
>
> foo: id bar_id
> |
> v
> bar: id baz_id
> |
> v
> baz: id the_field_I_want
You don't. You define a rel in bar and do
join => { name_of_foo_to_bar_rel => 'name_of_bar_to_baz_rel' }
then $foo->name_of_foo_to_bar_rel->name_of_bar_to_baz_rel->the_field_I_want
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.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]/