specified-type))))
(if (and type (not (member :not-null (listify db-constraints))))
`(or null ,type)
- type)))
+ (or type t))))
;; Compute the slot definition for slots in a view-class. Figures out
;; what kind of database value (if any) is stored there, generates and
(slot-definition-name obj)))
(apply #'call-next-method obj
'specified-type type
- :type (compute-lisp-type-from-specified-type
- type db-constraints)
+ :type (if (and (eql db-kind :virtual) (null type))
+ t
+ (compute-lisp-type-from-specified-type
+ type db-constraints))
initargs))
(defmethod compute-effective-slot-definition ((class standard-db-class)
(setf (specified-type esd)
(delistify-dsd (specified-type dsd)))
+ ;; The type-check-function is computed at defclass expansion,
+ ;; which is too early for the CLSQL type conversion to take
+ ;; place. This gets rid of it. It's ugly but it's better
+ ;; than nothing -wcp10/4/10.
+ #+sbcl (setf (slot-value esd 'sb-pcl::%type-check-function) nil)
)
;; all other slots