[Dbix-class] Microsoft SQL Server Primary Key Auto-Increment Woes

Marc Mims marc at questright.com
Mon Jul 21 16:56:17 BST 2008


* Matt S Trout <dbix-class at trout.me.uk> [080719 18:30]:
> Are you guys using MSSQL via ODBC?
> 
> I think because that tries to wrap $storage->insert it won't work unless
> the $storage is already connected.
> 
> $schema->storage->ensure_connected;
> 
> should work as a query-free workaround if so.
> 
> Assuming that's true, can Marc Mims (the author) or anybody else who's
> interested start looking at a fix?

It appears to me all that is required is $self->ensure_connected in the
overridden insert.  I'd be happy to make that change if one of the MSSQL
users will test it.

Although I wrote the module, I did so without the benefit of access to
MSSQL.  If the change proves to be more involved, I'd appreciate one of
the MSSQL users giving me some limited server access so I can test the
code.

	-Marc



More information about the DBIx-Class mailing list