[sqlalchemy] Re: obtaining previous value in mapper.extension.after_*

2007-12-17 Thread Michael Bayer
On Dec 16, 2007, at 3:26 PM, [EMAIL PROTECTED] wrote: and another issue around attribute.get_history... i have a descriptor that is autosetting some defaultvalue at first get. a descriptor on top of the InstrumentedAttribute itself ? id wonder how you are configuring that.

[sqlalchemy] Re: obtaining previous value in mapper.extension.after_*

2007-12-17 Thread sdobrev
Michael Bayer wrote: On Dec 16, 2007, at 3:26 PM, [EMAIL PROTECTED] wrote: and another issue around attribute.get_history... i have a descriptor that is autosetting some defaultvalue at first get. a descriptor on top of the InstrumentedAttribute itself ? id wonder how you are

[sqlalchemy] Re: obtaining previous value in mapper.extension.after_*

2007-12-17 Thread sdobrev
yes and no, as i said i'm replacing the __dict__ with something special; so its IA riding on top of me (;-) but otherwise its that. no renaming, i dont want someone (thats can be me, later) to be able to workaround either me or SA. then have your magic __dict__ implement the same

[sqlalchemy] Re: obtaining previous value in mapper.extension.after_*

2007-12-16 Thread sdobrev
[EMAIL PROTECTED] wrote: i used to get the original (before change) value of some attribute via state.commited_state[key]... but seems now that dict is empty at the time when ext.after_* are called. any way to get that? storing copies at ext.before_* is not good alternative... found some

[sqlalchemy] Re: obtaining previous value in mapper.extension.after_*

2007-12-16 Thread Michael Bayer
On Dec 16, 2007, at 2:33 PM, [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: i used to get the original (before change) value of some attribute via state.commited_state[key]... but seems now that dict is empty at the time when ext.after_* are called. any way to get that? storing

[sqlalchemy] Re: obtaining previous value in mapper.extension.after_*

2007-12-16 Thread sdobrev
and another issue around attribute.get_history... i have a descriptor that is autosetting some defaultvalue at first get. before r3935 it was ok; now the atribute is not updated anymore (in exact case, another object has to be inserted but it is not) as it seems that ScalarObjectAttributeImpl

[sqlalchemy] Re: obtaining previous value in mapper.extension.after_*

2007-12-16 Thread Michael Bayer
On Dec 16, 2007, at 3:16 PM, [EMAIL PROTECTED] wrote: not sure what the three get_history sublists are for... (added, unchanged, deleted) = attributes.get_history(myinstance._state, 'someattribute') three lists will never be None unless you call get_history() with passive=True and