X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=sql%2Foodml.lisp;h=aebadfa27b31346c0e1294f190cd7b669eb991c0;hp=4644bf1c1589fdb351bb5ea1833f688d68c7daa1;hb=67a677df17f4af2cbf6e57294605f2454c392e00;hpb=9172cacc5ce2c8e36bf81ca0cede1179820edf8e diff --git a/sql/oodml.lisp b/sql/oodml.lisp index 4644bf1..aebadfa 100644 --- a/sql/oodml.lisp +++ b/sql/oodml.lisp @@ -103,7 +103,7 @@ ((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 @@ -120,7 +120,7 @@ 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."))))) @@ -130,7 +130,7 @@ (dbtype (specified-type slotdef))) (typecase dbwriter (string (format nil dbwriter val)) - (function (apply dbwriter (list val))) + ((or symbol function) (apply dbwriter (list val))) (t (database-output-sql-as-type (typecase dbtype @@ -261,8 +261,9 @@ (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)))))