sqlalchemy-imageattach icon indicating copy to clipboard operation
sqlalchemy-imageattach copied to clipboard

Transactions are not multi-session safe

Open eric-wieser opened this issue 9 years ago • 0 comments

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.

eric-wieser avatar Oct 07 '14 23:10 eric-wieser