From: Nathan Bird Date: Thu, 15 Jan 2009 16:19:09 +0000 (-0500) Subject: If updating an instance from the database and we found the row in the X-Git-Tag: v5.0.5~8^2^2~8 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=9a05cd95046f8072d229ff8a4ae6bbd0bc88b108 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. --- 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)