Next Prev Up Top Contents Index

4.2.0.2 Example

(def-view-class car
               (standard-db-object standard-kb-object)
               ((car_no :db-kind :key)
                (keeper)
                (owner :db-kind :join
                       :db-info (:home-key :keeper
                                 :foreign-key person_id
                                 :retrieval :deferred
                                 :join-class person))))

defines a database class car where the person object in the keeper slot is retrieved from the person table in the database using the value of the keeper slot as key, only when queried. In the list of superclasses, standard-kb-object should appear after standard-db-object .


LispWorks KnowledgeWorks and Prolog User Guide - 14 Dec 2001

Next Prev Up Top Contents Index