[Sqlalchemy-tickets] [sqlalchemy] #1360: yet another autoflush within merge bug
Brought to you by:
zzzeek
From: sqlalchemy <mi...@zz...> - 2009-03-31 14:36:49
|
#1360: yet another autoflush within merge bug --------------------+------------------------------------------------------- Reporter: zzzeek | Owner: zzzeek Type: defect | Status: new Priority: high | Milestone: 0.5.xx Component: orm | Severity: minor - half an hour Keywords: | Status_field: in progress --------------------+------------------------------------------------------- {{{ @testing.resolve_artifact_names def test_cascades_dont_autoflush_2(self): mapper(User, users, properties={ 'addresses':relation(Address, backref='user', cascade="all, delete-orphan") }) mapper(Address, addresses) u = User(id=7, name='fred', addresses=[ Address(id=1, email_address='fred1'), ]) sess = create_session(autoflush=True, autocommit=False) sess.add(u) sess.commit() sess.expunge_all() u = User(id=7, name='fred', addresses=[ Address(id=1, email_address='fred1'), Address(id=2, email_address='fred2'), ]) sess.merge(u) sess.commit() }}} -- Ticket URL: <http://www.sqlalchemy.org/trac/ticket/1360> sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |