[sqlalchemy] Re: Stuck on flush vs commit problems

2008-04-12 Thread iain duncan
Narrowing it down, I guess what I'm really confused about is why, given two booking objects, in complete and ok to save and one not, I can't do session.save_or_update( complete_booking ) session.flush( complete_booking ) ( keeping booking incomplete around until later ) On the other hand I see

[sqlalchemy] Stuck on flush vs commit problems

2008-04-12 Thread iain duncan
Hi everyone, I'm stuck going around in circles here so any help would be great. I don't know whether I should be using transactions or not to solve this, but haven't got it working yet with either flushes or commits. Problem: - a gui app manages two resources, bookings and clients - bookings hav

[sqlalchemy] from_obj kwarg in SA 0.4.x

2008-04-12 Thread Acm
In SQLAlchemy 0.3.11 I had a query similar to the following: session.query(User).select(user_def.c.id==1, from_obj=[user_def.join(role_def)]) (where user_def and role_def are instances of Table and User is an object mapped to table user_def) Now I installed SQLAlchemy 0.4.5 and have to modify