From: Arthur Axel "fREW" Schmidt Date: Tue, 1 Sep 2009 18:27:36 +0000 (+0000) Subject: pod describing strife with MSSQL X-Git-Tag: v0.08111~35 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fd05d10a0f2840dfe35e10ad848a62bcc5e816fb;p=dbsrgits%2FDBIx-Class.git pod describing strife with MSSQL --- diff --git a/lib/DBIx/Class/Storage/DBI/MSSQL.pm b/lib/DBIx/Class/Storage/DBI/MSSQL.pm index 8742559..8bcb8cb 100644 --- a/lib/DBIx/Class/Storage/DBI/MSSQL.pm +++ b/lib/DBIx/Class/Storage/DBI/MSSQL.pm @@ -198,6 +198,8 @@ L. =head1 IMPLEMENTATION NOTES +=head2 IDENTITY information + Microsoft SQL Server supports three methods of retrieving the IDENTITY value for inserted row: IDENT_CURRENT, @@IDENTITY, and SCOPE_IDENTITY(). SCOPE_IDENTITY is used here because it is the safest. However, it must @@ -216,6 +218,14 @@ This is more dangerous, as inserting into a table with an on insert trigger that inserts into another table with an identity will give erroneous results on recent versions of SQL Server. +=head2 bulk_insert + +Be aware that we have tried to make things as simple as possible for our users. +For MSSQL that means that when a user tries to do a populate/bulk_insert which +includes an autoincrementing column, we will try to tell the database to allow +the insertion of the autoinc column. But the user must have the db_ddladmin +role membership, otherwise you will get a fairly opaque error message. + =head1 AUTHOR See L.