I understand that solution. I did say without a python property. But if that's the only real way to do it, so be it. Maybe I was just looking for an excuse to learn how to define a custom type. ;)
~jon On Jan 23, 9:56 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Jan 23, 2008, at 10:16 PM, Jonathon Anderson wrote: > > > > > So, in constructing my test case, I figured out what was going on. > > (I'm sure this is often the case.) > > >http://pastebin.com/m612561a6 > > > The problem is that process_result_value is only called when actually > > loading values from the database, and since a session maintains an > > object cache for object identity persistence, it it doesn't update the > > instance value. > > > Is there some way to get the behavior I want in > > test_values_sameinstance without closing/clearing the session, or > > duplicating my logic in a python property? > > sure the python property version is illustrated here: > > http://www.sqlalchemy.org/docs/04/mappers.html#advdatamapping_mapper_... > > depending on what youre doing this may remove the need to have a > custom column type. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---