[Sqlalchemy-tickets] Issue #3369: ORM attributed updated but not reflected in queries. (zzzeek/sqla
Brought to you by:
zzzeek
|
From: timtadh <iss...@bi...> - 2015-04-17 19:46:59
|
New issue 3369: ORM attributed updated but not reflected in queries. https://bitbucket.org/zzzeek/sqlalchemy/issue/3369/orm-attributed-updated-but-not-reflected timtadh: This is for SQL Alchemy 1.0.0b1 - release. The attached file reproduces the bug. It will print "passed test" if the bug is not present or "failed test" if the bug is present. You must first setup the database credentials in the test file. The bug: I create a new ORM object and then override a foreign key manually. I then add the row and commit it. In prior versions of SQLAlchemy (for instance 0.9.9) this will cause an integrity error as the child row is not present. In 1.0.0 the wrong attribute is rendered in the SQL insert query. This means no integrity error occurs and the insert succeeds. However, it has inserted the wrong data. Enivronment: pypy: 2.5.1 (cpython 2.7.9 compat) SQLAlchemy: 1.0.0 (works in 0.9.9) MySQL: 5.6 |