Hello,

since I made an update in our project that uses elephant (from version 0.3 to 
1.0.a2) I noticed that the remove-association-patch that was created and sent 
to you by Marc some time ago was not applied yet.
It fixes some problems with removing elephant-associations.
I created the same patch on the new version, maybe you could apply it to the 
elephant-repository?


Best regards

Lukas
                                          
_________________________________________________________________
http://redirect.gimas.net/?n=M0912xMobileIM
Neu, kostenlos & von unterwegs: Der Messenger fürs Handy!
Wed Dec 16 11:10:47 CET 2009  lukas.giessm...@hotmail.de
  * remove-association

New patches:

[remove-association
lukas.giessm...@hotmail.de**20091216101047
 Ignore-this: 86dc87403a2617800d913be373dd6992
] {
hunk ./src/elephant/associations.lisp 102
   (let ((index (get-association-index slot-def (get-con instance))))
     (if (and (eq (association-type slot-def) :ref)
 	     (slot-boundp-using-class class instance slot-def))
-	(remove-kv-pair (slot-value-using-class class instance slot-def) (oid instance) index)
-	(remove-kv-pair (oid associated) (oid instance) index))))
+	(remove-kv-pair (oid (slot-value-using-class class instance slot-def)) (oid instance) index)
+	(when associated ;it is possible that the original association
+                         ;slot was not bound at the time of
+                         ;deletion. thus, remove the entry only when
+                         ;it is bound
+	  (remove-kv-pair (oid associated) (oid instance) index)))))
 
 (defun update-other-association-end (class instance slot-def other-instance)
   "Update the association index for the other object so that it maps from
hunk ./src/elephant/associations.lisp 175
     (when (type-check-association instance slot-def associated)
       (ensure-transaction (:store-controller sc)
 	(case (association-type slot-def)
-	  (:ref (setf (slot-value instance (if (symbolp slotname) slotname (slot-definition-name slotname))) nil))
-	  (:m21 (remove-association-end fclass associated fslot instance))
+	  (:ref (when (slot-boundp-using-class class instance slot-def)
+                  (slot-makunbound-using-class class instance slot-def)))
+          (:m21 (when (slot-boundp-using-class fclass associated fslot)
+                  (slot-makunbound-using-class fclass associated fslot)))
           (:m2m (remove-association-end fclass associated fslot instance)
 		(remove-association-end class instance slot-def associated)))))))
 
}

Context:

[TAG ELEPHANT-1-0-A2
esl...@common-lisp.net**20090113201539] 
[Clean up memutil fixnum interface
iesl...@common-lisp.net**20090113200727] 
[Association declaration bug
iesl...@common-lisp.net**20090113200713] 
[Clean up serialier use of memutil; bdb condition msg
iesl...@common-lisp.net**20090113195939] 
[Revert sbcl fast locks; add errfile to BDB; improve cache locking
iesl...@common-lisp.net**20090113013529] 
[Fix race condition in caching; add BDB errfile support; minor imprrovements to transaction macro and pset api.
iesl...@common-lisp.net**20090112223522] 
[Ensure that BDB condition is valid during macroexpansion
iesl...@common-lisp.net**20090112210529] 
[Fix testcondition conflicts
esl...@common-lisp.net**20090110200538] 
[Fix transaction inhibit test
iesl...@common-lisp.net**20090110004336] 
[Fixup indexing for clozure; BDB transaction inhibiting bugfix
esl...@common-lisp.net**20090110165542] 
[Fix rollback test
iesl...@common-lisp.net**20090110004026] 
[Performance declarations (not verified on all lisps)
iesl...@common-lisp.net**20090109143359] 
[Fix bug in inhibit-rollback; fix reinit bug on persistent-metaclas
iesl...@common-lisp.net**20090109104433] 
[Remove default register argument enabled for BDB
iesl...@common-lisp.net**20090109071045] 
[Inhibit-rollback option to BDB transactions for arbitrary non-local exits
iesl...@common-lisp.net**20090109070733] 
[Revert some minor changes
iesl...@common-lisp.net**20090109035713] 
[Simple extension to snapshot-set
iesl...@common-lisp.net**20090109031720] 
[Fix duplicate item warning in BDB index writes
iesl...@common-lisp.net**20090107153442] 
[Fix load order and layout for GC subsystem
iesl...@common-lisp.net**20090107125806] 
[Enhance concurrent gc to catch writes during the mark phase
iesl...@common-lisp.net**20090107053908] 
[Change code version to 1.0; optimize symbol interning in serializer
iesl...@common-lisp.net**20090107042700] 
[TAG ELEPHANT-1-0-A1
iesl...@common-lisp.net**20090105234537] 
Patch bundle hash:
499216a2aba238e27f0886dd1cc7fc4cbf1ef232
_______________________________________________
elephant-devel site list
elephant-devel@common-lisp.net
http://common-lisp.net/mailman/listinfo/elephant-devel

Reply via email to