uG has asked for the wisdom of the Perl Monks concerning the following question:
Hello again monks!
I want to join 2 tables where id1 OR id2 = nation.id
However, i'm getting a
error when I callCan't handle this yet
I am implementing this wrong, or is this something dbix really can't do yet? (Relevant Schema's below)my $resource_rs = $nation_rs->trades->search_related('nation')->search +_related('resources');
package Game::DB::Schema::Nation; __PACKAGE__->has_many( trades => 'Game::DB::Schema::Trades', [ 'foreign.id1' => 'self.id', 'foreign.id2' => 'self.id', ], ); package Game::DB::Schema:Trades; __PACKAGE__->belongs_to( nation => 'Game::DB::Schema::Nation', [ 'foreign.id' => 'self.id1', 'foreign.id' => 'self.id2', ], );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: dbix: Can't handle this yet error (joining using or?)
by juster (Friar) on Sep 13, 2008 at 10:17 UTC | |
by uG (Scribe) on Sep 13, 2008 at 17:12 UTC | |
by juster (Friar) on Sep 13, 2008 at 21:08 UTC | |
Re: dbix: Can't handle this yet error (joining using or?)
by Anonymous Monk on Sep 13, 2008 at 10:22 UTC |
Back to
Seekers of Perl Wisdom