From: Hoehle, Joerg-C. <Joe...@t-...> - 2004-09-13 08:52:28
|
Hi, >> *** - DEFCLASS STANDARD-DB-OBJECT, slot option for slot=20 >VIEW-DATABASE: >> :DB-KIND is not a valid slot option > >In order for a slot option in defclass to be valid, [...] >Is this the case in clsql-3.0.3? From what I can tell, yes. > 1) The class must be of a special metaclass (here:=20 >standard-db-class), > 2) The GF direct-slot-definition-class must be overridden to > return a special slot definition class for standard-db-class. clsql-3.0-3/sql/metaclass.lisp has: (defmethod direct-slot-definition-class ((class standard-db-class) #+kmr-normal-dsdc &rest initargs) (declare (ignore initargs)) (find-class 'view-class-direct-slot-definition)) :kmr-normal-dsdc is in *features* > 3) This special slot definition class must have an initarg=20 >corresponding > to the desired slot option (here: :db-kind). (defclass view-class-direct-slot-definition = (view-class-slot-definition-mixin standard-direct-slot-definition) ()) (defclass view-class-slot-definition-mixin () ((column :accessor view-class-slot-column :initarg :column :documentation "The name of the SQL column this slot is stored in. Defaults to the slot name.") (db-kind :accessor view-class-slot-db-kind :initarg :db-kind :initform :base ;; openmcl 0.14.2 stores the value as list in the DSD ;; :type (or list keyword) #-openmcl :type #-openmcl keyword :documentation "The kind of DB mapping which is performed for this slot. :base indicates the slot maps to an ordinary column of the DB view. :key indicates that this slot corresponds to part of the unique keys for this view, :join indicates ... and :virtual indicates that this slot is an ordinary CLOS slot. Defaults to :base.") [...] metaclasses.lisp is compiled and loaded before ooddl.lisp gets = compiled. Do you have time & will to look into this? You don't need UFFI to = asdf:load clsql.asd, because it should compile stand-alone. It's the = db-dependent systems that depend on UFFI, like clsql-postgres.asd. Regards, J=C3=B6rg H=C3=B6hle. |