> 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' => 'App::Schema2::RS',
> 'fk');

That's undwimmable - DBIC has no way of knowing what $schema object to use on
the other side, and a relationship in DBIC is expected to be a "proper" DB
relationship, i.e. one you can join on.

Fair enough.

> Is there any way I can roll my own?

Use inflate_column - this is why where CDBI (which doesn't know what a JOIN
is) has has_a for both FKs and inflates, DBIC keeps belongs_to and
inflate_column separate.

Sounds good... but I'm unclear on how inflate_column gets the schema
of the 'foreign' database. Does this need to be passed to the original
schema at some point, so it's row
objects can access it?

Thanks.

_______________________________________________
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]/

Reply via email to