[Dbix-class] what to do for join.
Hiroyuki Yamada
yamahiroyu.y at gmail.com
Wed Mar 14 03:25:09 GMT 2007
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
More information about the Dbix-class
mailing list