[PATCH] fix MS-SQL so that engine.reflection.ReflectionTest.testidentity pass

Issue #685 resolved
Former user created an issue

The current mssql reflecttable implementation does not retrived identity seed and increment from the table definition.

The attached patch do an additional query to get the values. Note that the query is handwritten, not generated in a SA way, as I'm not sure how to do that properly.

Comments (2)

  1. Former user Account Deleted

    (original author: ram) Table reflection is slow already, and adding an additional query for each and every column that uses a Sequence will make it worse.

    Most likely, 99% of the identity columns in common use are going to be (1,1). Perhaps the table reflection load can take a parameter of whether or not to check for identity seed values or not: it doesn't make sense to have 99% of use cases suffer for the the 1%.

    I'm going to hold on this pending further discussion of whether we can incorporate such an option. Please bring it up on the mailing list if it's important to you.

  2. Log in to comment