On 11/24/06, Sam Crawley <[EMAIL PROTECTED]> wrote:

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?



You could make your inflate_column methods closures over the other DB's
schema object.

For example, in your table class:

my $other_schema = DB::Other->connect( ... );
__PACKAGE__->inflate_column( fkey_col => { inflate => sub {
$other_schema->resultset('Table')->search( { id => shift } ) },
                                        deflate => sub { shift->id } } );
_______________________________________________
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