Skip Menu |

This queue is for tickets about the DBD-Mock CPAN distribution.

Report information
The Basics
Id: 22848
Status: resolved
Priority: 0/
Queue: DBD-Mock

People
Owner: stevan.little [...] gmail.com
Requestors: DAMI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 1.34
Fixed in: (no value)



Subject: missing method last_insert_id
DBI has a method $dbi->last_insert_id(...) which is not implemented in the DBD::Mock driver. So client code doing cascaded inserts cannot be tested. So please include the following lines in the next release : package DBD::Mock::db; sub last_insert_id { my ( $dbh ) = @_; return $dbh->{mock_last_insert_id}; }
The last_insert_id of the $dbh is much more complex than that actually (see the latest DBI docs), so the supplied verison will not work. Please use the mock_last_insert_id attribute like so: $dbh->{mock_last_insert_id} - Stevan