This involves creating a meta-model, a clsql view-class, and the setting up the default attributes for a mewa presentation"
`(progn
- (def-view-class/table ,table)
+ (def-view-class-from-table ,table)
(set-default-attributes (quote ,(meta-model::sql->sym table))))))
(defmacro initialize-lol-for-table (&rest tables)
(defmethod find-slot-presentation-for-attribute ((self mewa) attribute)
(let ((class-name
- (or (gethash (second attribute) ucw::*slot-type-mapping*)
+ (or (gethash (if (consp (second attribute))
+ (car (second attribute))
+ (second attribute))
+ ucw::*slot-type-mapping*)
(error "Can't find slot type for ~A" (second attribute)))))
(cons (first attribute) (apply #'make-instance
(initialize-slots p)
(assoc type (find-all-attributes p))))
;;;; TODO: this can be cleaned up, probably CHANGE-CLASS is better here
- (i (apply #'change-class p (or (second a)
+ (i (apply #'make-instance (or (second a)
;; if we didnt find the type,
;; use the symbol as a class.
(if (eql (symbol-package type)
:instance-is-stored-p
;;;; Meta Model Exports))
- :def-view-class/table
+ :define-meta-model
+ :def-view-class-from-table
:def-view-class/meta
:list-slot-types
))
\ No newline at end of file