snapshotting w/ autocommit funky

Issue #1046 resolved
jek created an issue

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)

  1. Log in to comment