I'm replying to myself.
This is what I needed.
http://lists.scsys.co.uk/pipermail/dbix-class/2007-January/003245.html
I got it.
As described above history,
it's very hard to understand joining in DBIx::Class with cd/artist
example in the document.
I'll be very appreciated that more examples for join come out anytime soon.
Thanks,
Hiroyuki Yamada
2007/3/14, Hiroyuki Yamada <[EMAIL PROTECTED]>:
Hi,
I'm struggling working on (inner) join in DBIx::Class.
I looked through the documents but, didn't figure out what to do.
table A (class name is 'ClassA')
---
id
tmp_id
---
table B (class name is 'ClassB')
---
id
info1
info2
info3
---
What I want to do is very simple listed below.
select * from A, B where A.id = B.id and A.tmp_id = 'someid';
In DBIx::Class
$rs = $schema->resultset('ClassB')->search(
{
'A.tmp_id' => 'someid'
},
{
join => [qw/A/],
}
);
It doesn't work and i get the following error.
"No such relationship ... "
Do I have to specify the relationship for the normal join ?
Does anybody know what to do to achieve the sql ?
Thanks,
Hiroyuki Yamada
_______________________________________________
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]/