Was returning arrayref due to missing arrow, tests were passing because
arrayref numifies. Added a test that catches this.
my ($rv, $sth, @bind) = $self->next::method(@_);
- $self->_identity( ($sth->fetchall_arrayref)[0][0] )
+ $self->_identity( ($sth->fetchall_arrayref)->[0][0] )
if $self->_perform_autoinc_retrieval;
return wantarray ? ($rv, $sth, @bind) : $rv;
# test primary key handling
my $new = $schema->resultset('Artist')->create({ name => 'foo' });
+ like $new->artistid, qr/^\d+\z/, 'Auto-PK returned a number';
ok($new->artistid > 0, "Auto-PK worked");
$seen_id{$new->artistid}++;