it's all okay. i just thought that if it is a "Context", u should have some destructors - as u call many constructors. otherwise it is not reentrant - or at least repeatable.
But if the idea is that this context will always be one-and-only, lives forever, and all db-stuff will happen within this one single instance, then, yeah, no point of destructing anything. > > Here some i've found useful so far (sorry, not immediately > > usable): -------------- > > def destroy( me, full =True): > > def detach_instances( namespace_or_iterable, idname ='id'): > These may be useful in a library of SQLAlchemy utility functions > but they're outside SAContext's scope. SAContext doesn't contain > mappers so it shouldn't be clearing them. Likewise it doesn't > contain tables metadata does. and u have metadata. as of mappers - i dont know what happens if u clear metadata but do not clear mappers. > But don't these "destroy everything" scenarios mainly occur during > interactive debugging and experimentation? Where in an application > would you want to clear mappers, detach an object with no traces > left behind (aren't session.clear() and session.expunge() good > enough?), or destroy everything? session.stuff() cannot clear instance-keys (of identity-map). So u cannot re-save your objects into another SA context. now u ask where... dunno, i ran into it the other day, in rather plain blackbox testing, and thought it can be good for completeness sake. One should be able to do testing without huge time-code-investment... anyway, dont bother. svil --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---