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?

~jon

On Jan 23, 3:31 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On Jan 23, 2008, at 4:25 PM, Jonathon Anderson wrote:
>
>
>
>
>
> > Oh, no. I'm not doing any raw sql.
>
> > I have (at a most basic level):
>
> > things_table = Table("things", metadata,
> >    Column("id", types.Integer, primary_key=True),
> >    Column("values", StringSet, nullable=True),
> > )
>
> > class Thing (object):
> >    pass
>
> > Session.mapper(Thing, things_table)
>
> > But when I do Thing.query.all()[0].values, process_result_value is
> > never called.
>
> unit tests pass on this end, can you provide a full test case  
> illustrating the issue ?
--~--~---------~--~----~------------~-------~--~----~
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