From 9a05cd95046f8072d229ff8a4ae6bbd0bc88b108 Mon Sep 17 00:00:00 2001 From: Nathan Bird Date: Thu, 15 Jan 2009 11:19:09 -0500 Subject: [PATCH] If updating an instance from the database and we found the row in the database then set the view-database slot. This indicates that this instance now reflects an object in that DB. Underneath get-slot-values-from-view (the next function) we depend on the slot being present. --- sql/oodml.lisp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/oodml.lisp b/sql/oodml.lisp index 5cf8623..710e5e8 100644 --- a/sql/oodml.lisp +++ b/sql/oodml.lisp @@ -332,6 +332,7 @@ :result-types nil :database vd)))) (when res + (setf (slot-value instance 'view-database) vd) (get-slot-values-from-view instance (mapcar #'car sels) (car res)))) (pres) (t nil))))) @@ -358,6 +359,7 @@ (res (select att-ref :from view-table :where view-qual :result-types nil))) (when res + (setf (slot-value instance 'view-database) vd) (get-slot-values-from-view instance (list slot-def) (car res)))))) (defmethod update-slot-with-null ((object standard-db-object) -- 2.34.1