X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=sql%2Foodml.lisp;h=bf9026bd36ae4ba66918eb45df2b3894ce869549;hp=5469a0381b089eacc951f60d510974058d0dc721;hb=39e2802cd264ddacb3ca59b3b2c5c38f202149de;hpb=f5b49cfe271f8c467f74002eaf27e1d93409cdc5 diff --git a/sql/oodml.lisp b/sql/oodml.lisp index 5469a03..bf9026b 100644 --- a/sql/oodml.lisp +++ b/sql/oodml.lisp @@ -219,7 +219,7 @@ "Find the best class to associate with the slot. If it is normalized then it needs to be a direct slot otherwise it just needs to be on the class." - (let ((sd (find-class-slot-by-name class slot normalizedp))) + (let ((sd (find-slot-by-name class slot normalizedp nil))) (if sd ;;we found it directly or it's (not normalized) (pushnew sd (slot-defs (get-c&s-obj class))) @@ -310,10 +310,7 @@ ((obj standard-db-object) slot &key (database *default-database*)) (update-record-from-slots obj slot :database database)) -(defun %slot-storedp (slot-def) - "Whether or not a slot should be stored in the database based on its db-kind - and whether it is bound" - (member (view-class-slot-db-kind slot-def) '(:base :key))) + (defmethod view-classes-and-storable-slots-for-instance ((obj standard-db-object)) "Get a list of all the tables we need to update and the slots on them @@ -327,7 +324,7 @@ rtns) (labels ((storable-slots (class) (loop for sd in (slots-for-possibly-normalized-class class) - when (%slot-storedp sd) + when (key-or-base-slot-p sd) collect sd)) (get-classes-and-slots (class &aux (normalizedp (normalizedp class))) (let ((slots (storable-slots class)))