X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=sql%2Foodml.lisp;h=f797be0b02b36d611021bdffa4e9d3afc9477fea;hb=d3e3f05f8b8e58e597f70a105da9355548e13ed5;hp=9bd2ab66dea8f5db6b74f2665ea31092b2ebe899;hpb=e567409d9fff3f7231c2a0bb69b345e19de2b246;p=clsql.git diff --git a/sql/oodml.lisp b/sql/oodml.lisp index 9bd2ab6..f797be0 100644 --- a/sql/oodml.lisp +++ b/sql/oodml.lisp @@ -495,8 +495,10 @@ (defmethod database-output-sql-as-type ((type (eql 'float)) val database db-type) (declare (ignore database db-type)) - (let ((*read-default-float-format* (type-of val))) - (format nil "~F" val))) + (if (eq (type-of val) 'null) + nil + (let ((*read-default-float-format* (type-of val))) + (format nil "~F" val)))) (defmethod read-sql-value (val type database db-type) (declare (ignore type database db-type)) @@ -949,7 +951,6 @@ maximum of MAX-LEN instances updated in each query." (listify order-by))) (join-where nil)) - ;;(format t "sclasses: ~W~%ijc: ~W~%tables: ~W~%" sclasses immediate-join-classes tables) (dolist (ob order-by-slots) @@ -1094,7 +1095,7 @@ as elements of a list." ;; one selected table. This is required so FIND-ALL won't duplicate ;; the field (when (and order-by (= 1 (length target-args))) - (let ((table-name (view-table (find-class (car target-args)))) + (let ((table-name (view-table (find-class (car target-args)))) (order-by-list (copy-seq (listify order-by)))) (loop for i from 0 below (length order-by-list)