From 6bee16be3f891067ae8fe1a67e13b39e8ee72598 Mon Sep 17 00:00:00 2001 From: Russ Tyndall Date: Thu, 14 May 2009 13:27:38 -0400 Subject: [PATCH] Update-slots-from-instance now throws an exception if it generates an update without a where clause prev: 106b55bc15b5118cd328e3ebb6f5f67db3b26206 --- sql/oodml.lisp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sql/oodml.lisp b/sql/oodml.lisp index bb6f447..466e86a 100644 --- a/sql/oodml.lisp +++ b/sql/oodml.lisp @@ -225,11 +225,14 @@ (db-value-from-slot s val database)))) sds))) (cond ((and avps (view-database obj)) - (update-records (sql-expression :table vct) - :av-pairs avps - :where (key-qualifier-for-instance - obj :database database) - :database database)) + (let ((where (key-qualifier-for-instance + obj :database database))) + (unless where + (error "update-record-from-slots: could not generate a where clause for ~a" obj)) + (update-records (sql-expression :table vct) + :av-pairs avps + :where where + :database database))) ((and avps (not (view-database obj))) (insert-records :into (sql-expression :table vct) :av-pairs avps -- 2.34.1