From 7b96c12a4e3f3d005d4b01f0a543578333e71ecb Mon Sep 17 00:00:00 2001 From: Kevin Rosenberg Date: Sat, 6 Feb 2010 10:32:48 -0700 Subject: [PATCH] Ensure reasonable lisp type for slot in compute-lisp-type-from-specified-type --- ChangeLog | 5 +++++ sql/metaclasses.lisp | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 29c63d0..d227ac8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-02-06 Kevin Rosenberg + * sql/metaclasses.lisp: If no declared slot type in + compute-lisp-type-from-specified-type, then use t as lisp type. + Issue noted when testing Clozure CL 1.4. + 2010-02-06 Kevin Rosenberg * tests/test-init.lisp: Turn off the benign console notices for testing on postgres. 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) -- 2.34.1