[sqlalchemy] Re: Automatic generation of changelog

2007-04-04 Thread Arnar Birgisson
Hi Mike, I've started looking into this and this is exactly what I need. I can pretty much eat the stuff directly from added_items() and deleted_items() and insert that into my history-log table. One question though: On 3/28/07, Michael Bayer [EMAIL PROTECTED] wrote: dont have an example

[sqlalchemy] Re: Automatic generation of changelog

2007-04-04 Thread Arnar Birgisson
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

[sqlalchemy] Re: Automatic generation of changelog

2007-03-31 Thread imbunche
I'd also apreciate if you post your code later. thx in advance. IvO On Mar 28, 6:07 pm, Arnar Birgisson [EMAIL PROTECTED] wrote: Hi Dave, Thank you very much, seems I should be able to do what I want. I'll take a stab at it tomorrow and report. On 3/28/07, Michael Bayer [EMAIL PROTECTED]

[sqlalchemy] Re: Automatic generation of changelog

2007-03-31 Thread Arnar Birgisson
Gaetan and Ivo: Sure thing. I'll implement this one way or another monday or tuesday, will post what I end up with. Arnar On 4/1/07, imbunche [EMAIL PROTECTED] wrote: I'd also apreciate if you post your code later. thx in advance. IvO On Mar 28, 6:07 pm, Arnar Birgisson [EMAIL

[sqlalchemy] Re: Automatic generation of changelog

2007-03-28 Thread Michael Bayer
dont have an example handy, but yeah youd want to make a MapperExtension and work into the after_insert(), after_update() and after_delete() hooks (or maybe the before_ versions of each one, depending on how you detect changes). you can issue writes to the database immediately within those and

[sqlalchemy] Re: Automatic generation of changelog

2007-03-28 Thread Arnar Birgisson
Hi Dave, Thank you very much, seems I should be able to do what I want. I'll take a stab at it tomorrow and report. On 3/28/07, Michael Bayer [EMAIL PROTECTED] wrote: note that by history, we mean things that have occured since the instance was loaded from the database into the current

[sqlalchemy] Re: Automatic generation of changelog

2007-03-28 Thread Michael Bayer
On Mar 28, 2007, at 6:07 PM, Arnar Birgisson wrote: Hi Dave, Thank you very much, seems I should be able to do what I want. I'll take a stab at it tomorrow and report. On 3/28/07, Michael Bayer [EMAIL PROTECTED] wrote: note that by history, we mean things that have occured since the