Skip to content

Commit

Permalink
Trap exact condition of reported, yet undiagnosed IDENTITY_SELECT
Browse files Browse the repository at this point in the history
Something is popagating the _autoinc_supplied_for_op flag where it shouldn't
  • Loading branch information
ribasushi committed Sep 10, 2015
1 parent b8e92da commit 4a5fd48
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/DBIx/Class/Storage/DBI/IdentityInsert.pm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ sub _prep_for_execute {
my $table = $self->sql_maker->_quote($ident->name);
$op = uc $op;

DBIx::Class::Exception->throw(
"Unexpected _autoinc_supplied_for_op flag in callstack - please file a bug including the stacktrace ( @{[ DBIx::Class::_ENV_::HELP_URL() ]} ):\n\n STACKTRACE STARTS",
'stacktrace'
) if $op ne 'INSERT' and $op ne 'UPDATE';

my ($sql, $bind) = $self->next::method(@_);

return (<<EOS, $bind);
Expand Down

0 comments on commit 4a5fd48

Please sign in to comment.