On Jan 24, 2006, at 1:51 PM, Michael Bayer wrote:
you should be able to do this:

del objectstore.uow().identity_map[objectstore.instance_key(obj)]

hi mike,

i couldn't seem to get this to work.
afaict the identity_map is empty with
the test code that i have - i looked
around just in case in uow().[dirty,
new], but there doesn't seem to be
any objects there by the time i'm
calling the del.

i ended up poking my nose around and
ended up doing:

---
        del x1._managed_attributes
---

which appears to work, but i imagine
that's probably not the most graceful
solution. (although looking through
attributes.py it looks like that is
where the AttributeManager stashes
away the cache values?)

also, i'm presuming the following is
a typo (but the method doesn't get
called anywhere? i haven't encountered
any problems except in manual debugging
from this ...):

--- mapping/objectstore.py      (revision 840)
+++ mapping/objectstore.py      (working copy)
@@ -159,7 +159,7 @@
         self.parent = parent

     def get(self, class_, *id):
-        return sqlalchemy.mapper.object_mapper(class_).get(*id)
+        return sqlalchemy.mapping.object_mapper(class_).get(*id)



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to