On Dec 8, 2006, at 11:35 AM, Michael Bayer wrote:
>
> hey dan -
>
> dont have time to fully dig in yet, but are you aware that all object
> change detection is performed *by* the TypeEngine object now ?
> locate_dirty() finds pickle changes by inspecting the object attribute
> against the compare_values() function on TypeEngine (and the value its
> comparing to was created by the copy_value() method on TypeEngine).

Yes, I was aware of that.

>
> the main issue here would be getting session awareness in there, since
> the TypeEngine class knows nothing about the ORM and obviously  
> needs to
> stay that way.  i think the solution might involve creating a custom
> ORM-aware pickletype that is constructed with awareness of the
> SessionContext.

I'm not using SessionContext, and I can't use it in this situation.  
TypeEngine is actually too low-level for this task because there is  
no way for it to get the information it needs to do the pickle/ 
unpickle. As you said, TypeEngine should know nothing about the ORM.

I'm looking at a custom mapper property right now. Consider my last  
post about exposing that interface. I think it should be fairly  
simple to integrate into the existing API (actually it already seems  
to be there, just not documented). The issue I'm currently working on  
is how to let the property tell the attribute manager that it's value  
has been modified.

~ Daniel

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