Hi all, i have a problem on manage the sessions. I whish to insert 2 object on my database:
obj1 = machine() obj2 = action() i want to insert one machine and reuse the id of the machine for insert the action, this part is ok: config.Sess.add(obj1) config.Sess.commit() return config.Sess.refresh(obj1) then i want to insert more action for every machine: obj2.action = 'action1' obj2.freq = 'freq1' config.Sess.add(obj2) obj2.action = 'action2' obj2.freq = 'freq2' config.Sess.add(obj2) obj2.action = 'action3' obj2.freq = 'freq3' config.Sess.add(obj2) config.Sess.commit() But this code doesn't function and the code insert only the last action. Someone can help me? Thanks a lot Ghido --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---