I'm trying to add two new object using session.add(object) twice..but the first object disappear on session.commit()...why it happens?
A:
they must be of different object for them to be added to the session.commit().
b3rx
2009-08-03 22:25:52
it was a different object..ok, let say this is sample of my code: // assume the session and all python module have been imported beforeobj1 = object1()obj2 = object2()obj1.fullname = 'fullname'obj1.lastname = 'lastname'obj2.city = 'city'obj2.state = 'state'session.add_all([obj1, obj2])try: session.commit()except: session.rollback()// this was ok in sqlalchemy v0.5.3, but it face problem in v0.5.5// the first object was missing when session.commit() is called
2009-08-04 02:37:00
well it looks like you forgot that very crucial detail from your OP. If you could have added that to your OP, it would make life for others a lot easier. And as zzzeek have mentioned, try posting that information to sqlalchemy's mailing-loist.
b3rx
2009-08-04 05:33:44
A:
if the difference between 0.5.3 and 0.5.5 is all that changes, you probably want to create a fully illustrating example and post it on the mailing list at http://groups.google.com/group/sqlalchemy/ .
zzzeek
2009-08-04 03:44:53