On Jul 10, 2006, at 5:09 PM, Michael Carter wrote: > u = session.get(User, 1) > session.expunge(u) > cache(u) > session.update(u) > > That code causes u to not exist in the session's identity map. > > u = session.get(User, 1) > cache(u) > > This seems to work fine though. So, is expunge even necessary? From > the docs it sounded like I should first expunge the object from the > session before pickling it. >
well theres session identifiers that will be stuck on the object if you dont expunge it, then when you go to put it into another session it should raise an error. what is cache(u) doing exactly ? just saying expunge(x) then update (x) shouldnt be raising any errors. ------------------------------------------------------------------------- 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