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_overriding

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to