[Dbix-class] Relationships spanning multiple databases

Sam Crawley sam_crawley at warpmail.net
Thu Nov 23 11:31:02 GMT 2006


Hi,

I have two schemas connecting to two related databases. I'd like some way of
"joining" between the two, i.e. to be able to do this:

my $record =3D App::Schema1::RS->find(1);

my $rec2 =3D $record->rec_from_schema2;

Where $rec2 is something from Schema2, i.e. data from a different database.

I thought I may be able to setup a relationship from one schema to the
other, and DBIC would just DWIM, e.g.

App::Schema1::RS->belongs_to( 'rec_from_schema2' =3D> 'App::Schema2::RS',
'fk');

But that gives me "Can't find source for App::Schema2::RS".

Is there any way I can roll my own?

Thanks,
Sam. (Mutant)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20061123/572=
7fdb9/attachment.htm


More information about the Dbix-class mailing list