[bknr-cvs] hans changed trunk/bknr/datastore/src/data/object.lisp
BKNR Commits
bknr at bknr.net
Tue Jul 29 08:56:38 UTC 2008
Revision: 3673
Author: hans
URL: http://bknr.net/trac/changeset/3673
Always call CONVERT-SLOT-VALUE-WHILE-RESTORING and supply a default
method that just sets the slot's value to whatever was found in the
snapshot.
U trunk/bknr/datastore/src/data/object.lisp
Modified: trunk/bknr/datastore/src/data/object.lisp
===================================================================
--- trunk/bknr/datastore/src/data/object.lisp 2008-07-29 08:42:50 UTC (rev 3672)
+++ trunk/bknr/datastore/src/data/object.lisp 2008-07-29 08:56:38 UTC (rev 3673)
@@ -381,7 +381,9 @@
(:documentation "Generic function to be called to convert a slot's
value from a previous snapshot layout. OBJECT is the object that is
being restored, SLOT-NAME is the name of the slot in the old schema,
- VALUE is the value of the slot in the old schema."))
+ VALUE is the value of the slot in the old schema.")
+ (:method (object slot-name value)
+ (setf (slot-value object slot-name) value)))
(defun find-slot-name-with-automatic-rename (class slot-name)
(if (find slot-name (class-slots class) :key #'slot-definition-name)
@@ -445,9 +447,7 @@
(let ((bknr.indices::*indices-remove-p* nil))
(if (eq value 'unbound)
(slot-makunbound object slot-name)
- (if (slot-boundp object slot-name)
- (convert-slot-value-while-restoring object slot-name value)
- (setf (slot-value object slot-name) value))))))
+ (convert-slot-value-while-restoring object slot-name value)))))
(set-slot-nil ()
:report "Set slot to NIL."
(setf (slot-value object slot-name) nil))
More information about the Bknr-cvs
mailing list