Skip Menu |
 

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 34294
Status: rejected
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: alexhetu [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.08010
Fixed in: (no value)



Subject: DBD::Sybase last_insert_id
Download (untitled) / with headers
text/plain 751b
Perl 5.8.8 Gentoo 2007.0 ( 2.6.18-gentoo-r3 ) DBIx::Class 0.08010 Whenever trying to insert a row on SQLServer 2000 that has IDENTITY turned on, DBIx::Class croaks. Error : [error] DBIx::Class::Row::insert(): Can't locate DBI object method "last_insert_rowid" via package "DBD::Sybase::db" at /usr/lib/perl5/site_perl/5.8.8/DBIx/Class/Storage/DBI.pm line 1275. DBIC::SQL::Abstract calls 'last_insert_rowid' on DBD::Sybase, it should be calling 'last_insert_id'. A note in the code states SQLite as reason for writing 'last_insert_rowid'. 1272 sub _dbh_last_insert_id { 1273 my ($self, $dbh, $source, $col) = @_; 1274 # XXX This is a SQLite-ism as a default... is there a DBI-generic way? 1275 $dbh->func('last_insert_rowid'); 1276 }
Subject: DBD::Sybase last_insert_id
Download (untitled) / with headers
text/plain 751b
Perl 5.8.8 Gentoo 2007.0 ( 2.6.18-gentoo-r3 ) DBIx::Class 0.08010 Whenever trying to insert a row on SQLServer 2000 that has IDENTITY turned on, DBIx::Class croaks. Error : [error] DBIx::Class::Row::insert(): Can't locate DBI object method "last_insert_rowid" via package "DBD::Sybase::db" at /usr/lib/perl5/site_perl/5.8.8/DBIx/Class/Storage/DBI.pm line 1275. DBIC::SQL::Abstract calls 'last_insert_rowid' on DBD::Sybase, it should be calling 'last_insert_id'. A note in the code states SQLite as reason for writing 'last_insert_rowid'. 1272 sub _dbh_last_insert_id { 1273 my ($self, $dbh, $source, $col) = @_; 1274 # XXX This is a SQLite-ism as a default... is there a DBI-generic way? 1275 $dbh->func('last_insert_rowid'); 1276 }
Download (untitled) / with headers
text/plain 359b
You should be using: http://search.cpan.org/~ash/DBIx-Class-0.08010/lib/DBIx/Class/Storage/DBI/Sybase/MSSQL.pm This is not a bug, it's a misconfiguration in your schema - see the doc link. Ticket rejected - though if you fancy having a go at making DBIx::Class auto-select that storage class, post to the list and we'd be glad to help you sort out a patch.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.