]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Set IDENTITY_INSERT for insert.values({column: expr})
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 13 Feb 2019 16:26:54 +0000 (11:26 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 13 Feb 2019 16:26:54 +0000 (11:26 -0500)
commit71d642711d26ee8e1e7e8b19d70be8be1eca22eb
treeedaf76ca61a1cd35ee365cf99ddd3fd745358877
parent5cc5234e0b065907deb2765249dde1c526fe5c89
Set IDENTITY_INSERT for insert.values({column: expr})

Fixed bug where the SQL Server "IDENTITY_INSERT" logic that allows an INSERT
to proceed with an explicit value on an IDENTITY column was not detecting
the case where :meth:`.Insert.values` were used with a dictionary that
contained a :class:`.Column` as key and a SQL expression as a value.

Fixes: #4499
Change-Id: Ia61cd6524b030b40a665db9c20771f0c5aa5fcd7
doc/build/changelog/unreleased_12/4499.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mssql/base.py
test/dialect/mssql/test_query.py
test/orm/test_unitofwork.py