dahlia / sqlalchemy-imageattach

SQLAlchemy extension for attaching images to entities.
https://sqlalchemy-imageattach.readthedocs.io/
MIT License
116 stars 25 forks source link

Transactions are not multi-session safe #24

Open eric-wieser opened 10 years ago

eric-wieser commented 10 years ago

Consider:

a = Session()
b = Session()

add_images_to(a)
add_images_to(b)

a.commit()
b.rollback()

a.commit will commit bs images as well, because _stored_images is global state! It should be session-specific state.