- changed status to resolved
snapshotting w/ autocommit funky
Issue #1046
resolved
the 'unit of work is clean' assertions within .begin()
fail in an ugly way here. they can be made friendly, but i'm not sure what the right behavior here is in general.
from sqlalchemy import *
from sqlalchemy.orm import *
t = Table('a', MetaData('sqlite:///'),
Column('x', Integer, primary_key=True),
Column('y', Integer))
t.create()
t.insert().execute(x=1, y=2)
class T(object):
pass
mapper(T, t)
session = create_session(autocommit=True)
session.add(T())
session.begin()
session.flush()
session.commit()
Comments (2)
-
repo owner -
repo owner - removed milestone
Removing milestone: 0.5.0 (automated comment)
- Log in to comment
my first thought was 7d3ba0dec7c5e64f62108d7c4fb9b0cec1cc586a, but fcc4f9193a06aa87b0d95636af64213262a429e5 is much better.