[Dbix-class] Microsoft SQL Server Primary Key Auto-Increment Woes
John Myles White
jmw at johnmyleswhite.com
Sat Aug 30 14:46:45 BST 2008
My apologies for the delay in testing your patch, Marc. What you've
written completely resolves the problem.
Thank you so much for your help.
-- John
On Aug 12, 2008, at 1:47 PM, Marc Mims wrote:
> * John Myles White <jmw at johnmyleswhite.com> [080710 07:40]:
>> I've recently been tasked at work with porting a large in-house web
>> app
>> that uses DBIx::Class from MySQL to Microsoft SQL Server. In the
>> process, I've come across a problem where the auto-incrementing
>> primary
>> key column of the first row created using a DBIx::Class schema
>> object is
>> given an undef value rather than its true numeric value. All
>> subsequent
>> calls to create() against the same schema object give the proper
>> numeric
>> value of the primary key. Also, this problem does not come up if any
>> other method such as find() or search() has been previously called
>> against the schema object. Only a create() that is the very first
>> method
>> called on a given schema fails.
>> [snip]
>
> I committed a fix for this.
> http://dev.catalyst.perl.org/svnweb/bast/revision?rev=4750
>
> Please retest with trunk and let me know if you have any problems.
>
> A big thanks to Michael Higgins for getting me access to a MSSQL
> server
> for debugging and testing.
>
> -Marc
More information about the DBIx-Class
mailing list