On Wed, Oct 03, 2007 at 11:51:05PM +0100, Matt S Trout <[EMAIL PROTECTED]> wrote:
> On Wed, Oct 03, 2007 at 06:17:54PM +0200, Bernhard Weisshuhn wrote: > > > > [...] > > > > SELECT > > translatedwords.translatedword > > FROM > > userwords > > JOIN users ON (users.user = userwords.user) > > JOIN translatedwords ON ( > > translatedwords.language = users.language AND > > translatedwords.englishword = userwords.englishword > > ) > > WHERE > > userwords.user='someuser'; > > Just move on or other of the two cond in the second join into the > WHERE clause. OIC, thanks! So it's more of an SQL::Abstract issue then. So I came up with this one: my $userwords = $schema->resultset('Translatedwords')->search( { 'user.user' => 'someuser', 'me.language' => \'= user.language' }, { join => { englishword => { userwords => 'user' } } } ); Is there a way to avoid the ugly scalar reference? Thanks in advance, bkw _______________________________________________ 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]