postgresql+psycopg2: scalar_subquery
with bindparam
in insert returns only one value when inserting multiple rows with SQLAlchemy 2.0.0b1
#8639
Labels
bug
Something isn't working
great mcve
An issue with a great mcve
insertmanyvalues
insertmanyvalues feature
near-term release
addition to the milestone which indicates this should be in a near-term release
regression
something worked and was broken by a change
sql
Milestone
Describe the bug
I am very excited for SQL Alchemy 2.0 so I ran some projects with the first beta release. With PostgreSQL (postgresql+psycopg2 dialect) a scalar subquery with
bindparam
in insert returns only one value per batch instead of one value per row when inserting multiple rows.The code example works great against MySQL database (mysql+pymysql dialect).
To Reproduce
Error
There is no error, the code runs fine, but the inserted data is not fine. We're supposed to have different
product_class_id
for coca-cola and soda. Now we have product_class_id = 1 for both of them!Versions
Additional context
No response
The text was updated successfully, but these errors were encountered: