X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=sql%2Fmetaclasses.lisp;h=530c674c55f6f7da589180bc618d731b0aa283bb;hp=72cbc4fffd3c7df025f84aa311d0511a7e9628bb;hb=7b96c12a4e3f3d005d4b01f0a543578333e71ecb;hpb=a288098897afcc735a99d11999dbb30ce825d892 diff --git a/sql/metaclasses.lisp b/sql/metaclasses.lisp index 72cbc4f..530c674 100644 --- a/sql/metaclasses.lisp +++ b/sql/metaclasses.lisp @@ -425,7 +425,7 @@ implementations." 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 @@ -453,8 +453,10 @@ implementations." (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)