Hi,
I've a problem using SQ version 0.4.
I guess this is something I do wrong (since I'm a newbie with
SA) ... but it might be a bug ...
Basically the problem is the following : when I launch 2 sessions in
parallel : after a successful commit in the first session, requesting
the inserted object in the second session does not find anything
(although I can see the object in the database with manual sql)
Here is the "pseudo code" of my problem, because I hope someone will
find the problem easily, it's just pseudo code ... if this not so
obvious, I'm willing to give a "testcase" with all source sode (just
ask me) :
Obj is a simple python object with on field (key : String(10)) mapped
to a table with on field (key) with is the primary key.
Session is defined like this :
engine = create_engine("**mysql_string**", strategy='threadlocal',
pool_size=50)
Session = scoped_session(sessionmaker(bind=engine, autoflush=True,
transactional=True))
If I launch 2 python shells :
In the first I do :
sess = Session()
obj = Obj("first_key")
sess.save()
sess.commit()
In the second I do
sess = Session() #this is done at the same time than the creation in
the first shell
# wait after commit in shell 1
oo = sess.query(Obj).filter_by(key="first_key").first
# oo is None
Is that
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---