use mro 'c3';
use Carp::Clan qw/^DBIx::Class/;
use List::Util ();
+use Sub::Name ();
__PACKAGE__->mk_group_accessors('simple' =>
qw/_identity _blob_log_on_update _insert_dbh _identity_method/
sub _insert {
my ($self, $source, $to_insert, $blob_cols, $identity_col) = @_;
- my $updated_cols = $self->next::method ($source, $to_insert);
+ my $updated_cols =
+ (Sub::Name::subname insert =>
+ sub { $self->next::method ($source, $to_insert) })->();
my $final_row = {
$identity_col => $self->last_insert_id($source, $identity_col),
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_SYBASE_${_}" } qw/DSN USER PASS/};
-my $TESTS = 40 + 2;
+my $TESTS = 41 + 2;
if (not ($dsn && $user)) {
plan skip_all =>
# mostly stolen from the blob stuff Nniuq wrote for t/73oracle.t
SKIP: {
- skip 'TEXT/IMAGE support does not work with FreeTDS', 12
+ skip 'TEXT/IMAGE support does not work with FreeTDS', 13
if $schema->storage->using_freetds;
my $dbh = $schema->storage->_dbh;
};
diag $@ if $@;
ok($got eq $new_str, "verified updated blob");
+
+ ## try multi-row blob update
+ # first insert some blobs
+ $rs->find(1)->delete;
+ $rs->create({ blob => $binstr{large} }) for (1..3);
+ $new_str = $binstr{large} . 'foo';
+ $rs->update({ blob => $new_str });
+ is((grep $_->blob eq $new_str, $rs->all), 3, 'multi-row blob update');
}
# test MONEY column support