[Dbix-class] Join the same table twice
Jess Robinson
castaway at desert-island.me.uk
Wed Jul 4 09:27:18 GMT 2007
On Wed, 27 Jun 2007, myshare wrote:
> I try to
>
> $conn->search(
> { 'Conn_1.rid' => $tid, 'Conn_2.rid' => $pid, 'Conn_1.gid' =>
> 'Conn_2.gid' },
> { join => [ 'Conn', 'Conn' ] }
> ) ;
>
> as mentioned in the Join-docs,
> but get this error :
>
> DBIx::Class::ResultSet:: next(): No such relationship Conn ....
>
> But I don't have to define any relation if it is using the same table, right
> ?
You always need a relationship, it never joins on table names. (If that's
what you meant, if it wasn't, then please post your schema files as well).
> Second question : If I use auto loader, how can I still use the
> autoloader, but add some modification to the classes ? thanx
Create the table files, if loader finds them it will load them.
Jess
More information about the Dbix-class
mailing list