On Feb 20, 12:18 pm, David Bolen <[EMAIL PROTECTED]> wrote: > Michael Bayer <[EMAIL PROTECTED]> writes: > > I suppose in this case where I've got a better handle on the object > actually being changed (the one being saved()), that expunging that > one object might be the most effective approach, and is less effort > than clearing and then re-updating all the other objects. > > Unless - should I be more liberal in my creation of sessions? That > is, for this particular "add" operation would it actually be smarter > to grab a new session to contain the objects involved? be liberal in creating sessions. a session is to say, "I want to do this thing here. let me first create a session in which to do it". then when youre done just throw it away. the scope for a web application is pretty clear but not as much for GUI/commandline applications, where sometimes youd want a session thats just "open", if for nothing else so that lazy loaders have a session in which to load their items. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
