>> hi >> 1st one: i am saving some object; the mapperExtension of the object >> fires additional atomic updates of other things elsewhere >> (aggregator). >> These things has to be expired/refreshed... if i only knew them. >> For certain cases, the object knows exactly which are these target >> things. How (when) is best to expire these instances, i.e. assure that >> nexttime they are used they will be re-fetched? >> a) in the mapperext - this would be before the flush? >> b) later, after flush, marking them somehow ? >> > > the "public" way to mark an instance as expired is > session.expire(instance). if you wanted to do this inside the mapper > extension, i think its OK as long as you do the expire *after* the > object has been inserted/updated (i.e. in after_insert() or > after_update()). > in the after_*() there are (mapper, connection, instance) arguments - but there's no session. Any way to get to that? mapext.get_session() does not look like one
--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---