((typep slot-reader 'string)
(setf (slot-value instance slot-name)
(format nil slot-reader value)))
- ((typep slot-reader 'function)
+ ((typep slot-reader '(or symbol function))
(setf (slot-value instance slot-name)
(apply slot-reader (list value))))
(t
nil)
((typep slot-reader 'string)
(format nil slot-reader value))
- ((typep slot-reader 'function)
+ ((typep slot-reader '(or symbol function))
(apply slot-reader (list value)))
(t
(error "Slot reader is of an unusual type.")))))
(dbtype (specified-type slotdef)))
(typecase dbwriter
(string (format nil dbwriter val))
- (function (apply dbwriter (list val)))
+ ((and (or symbol function) (not null)) (apply dbwriter (list val)))
(t
(database-output-sql-as-type
(typecase dbtype
(sels (generate-selection-list view-class))
(res (apply #'select (append (mapcar #'cdr sels)
(list :from view-table
- :where view-qual)
- (list :result-types nil)))))
+ :where view-qual
+ :result-types nil
+ :database vd)))))
(when res
(get-slot-values-from-view instance (mapcar #'car sels) (car res)))))