On 4/4/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > its not going to be able to modify the current flush() plan thats in > progress, so youd either have to insert yourself, dispatch to > class_mapper(HistoryLoggedItem).save_obj() yourself, or process the > Session externally to the flush(), create the HLI items at that point > and add them (by perusing session.dirty and processing).
Ok, dispatching to class_mapper(...).save_obj() will get the sql executed right away? Will I need to .refresh() the HLI instances afterwards? The third option, creating the changelog-information independent of the flush - would that mean I can't use a mapper-extension to trigger it? Do I have any other ways for triggering things on object update. > the third option is slightly less automatic but would be the more > official "OO" way to do it, being that SA is a library, not a > framework. when you try to add behavior by patching inside of SA's > flush process, youre starting to use it as a framework. Ive noticed > the Python community *really* wants to turn things into frameworks :). Well, dynamic and introspective languages tend to be "framework friendly" I guess :o) Does it hurt in anyway to use passive=False when I get_history? In some cases I had to in order to get what I want (get_history was returning None). thanks, Arnar --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---