-(defmethod find-default-attributes ((model t))
- "return the default attributes for a given model using the meta-model's meta-data"
- (append (mapcar #'(lambda (s)
- (cons (car s)
- (gen-pslot
- (if (meta-model:foreign-key-p model (car s))
- 'foreign-key
- (cadr s))
- (string (car s)) (car s))))
- (meta-model:list-slot-types model))
- (mapcar #'(lambda (s)
- (cons s (append (gen-pslot 'has-many (string s) s)
- `(:presentation
- (make-presentation
- ,model
- :type :one-line)))))
- (meta-model:list-has-many model))
- (find-default-presentation-attribute-definitions)))
-
-(defmethod set-default-attributes ((model t))
- "Set the default attributes for MODEL"
- (clear-attributes model)
- (mapcar #'(lambda (x)
- (setf (find-attribute model (car x)) (cdr x)))
- (find-default-attributes model)))