On Jul 10, 2006, at 2:55 PM, Michael Carter wrote:
> That aside and more importantly, I'm still having some issues with  
> more basic stuff. That is, I can't get a handle on how to use  
> expunge and update properly. When I pickle an object to a file or  
> memcache (before or after expunging it), the _state attribute  
> doesn't go along with it, nor does any persistent attribute that  
> hasn't been changed from the default of None. Because of this,  
> update fails when it tries to access _state on the unpickled  
> version. I was originally unaware of this because the process works  
> out fine if I unpickle the item in the same python instance where I  
> pickled it -- the object has _state and all the other attributes.
>

er thats a little weird, when you unpickle the object, have all the  
relevant classes had the same Mappers set up on them ?  the _state  
attribute is a class-level property accessor that will only be there  
if the class has been set up with a mapper (as are all the other  
properties for which youre looking for default values).  the actual  
data for _state is in the __dict__ as "_<classname>__sa_attr_state".   
this is all class-level stuff thats not related to the instance being  
in or out of a Session.



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to