Commit a234d722 authored by ryszard.szopa's avatar ryszard.szopa
Browse files

NON-TRANSIENT-SLOTS-OF returns now a list of slots instead of a list of slot names.

parent 77622df1
......@@ -24,7 +24,7 @@
(defgeneric save-all-foreign-daos (dao)
(:documentation "Saves recursively all daos in the slots of DAO")
(:method ((dao dao))
(iter (for slot in (non-transient-slots-of dao))
(iter (for slot in (mapcar #'slot-definition-name (non-transient-slots-of dao)))
(let ((s-value (slot-value dao slot)))
(when (typep s-value 'dao)
(save-dao s-value))))))
......@@ -20,8 +20,8 @@
(mapcar #'slot-definition-name (class-slots (class-of object))))
(defun non-transient-slots-of (object)
"List of names of non-transient slots of OBJECT."
(mapcar #'slot-definition-name (remove-if #'transient-p (class-slots (class-of object)))))
"List of non-tansient slots of OBJECT"
(remove-if #'transient-p (class-slots (class-of object))))
(defun slot-value-or-id-if-foreign (object slot)
"SLOT-VALUE if SLOT in OBJECT is not foreign, the ID of the object in the slot otherwise."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment