On Sat, Mar 08, 2008 at 04:24:57PM +0000, Matt S Trout wrote:
> $result->result_source($schema2->source(ref $result));
> $result->in_storage(0);
> $result->insert;
>
> If you're sure that the record will either be identical in the other DB
> or not present, $result->discard_changes will figure out if it's in the DB
> or not. If you have changes as well, I guess
>
> $result->result_source($schema2->source(ref $result));
> my %save = $result->get_columns;
> $result->discard_changes;
> $result->set_column($_ => $save{$_}) for keys %save;
> $result->insert_or_update;
>
> would do the trick.
Thanks for the extra ideas .. if I get time at $orkplace I'll look into
it. At the moment it's not broke, so I ain't fixing it :)
Chisel
--
Chisel Wright
e: [EMAIL PROTECTED]
w: http://www.herlpacker.co.uk/
One in a million chances happen nine times out of ten.
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]