X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Foodml.lisp;h=8eec40e98fed5840c6aa487108d81904324c2a43;hb=106b55bc15b5118cd328e3ebb6f5f67db3b26206;hp=3e7ec9af023c31fc1c5d0e4cdd538c4ab2e8cfa5;hpb=2f98eda90939d43f05b9b060b23ae3acf721e580;p=clsql.git diff --git a/sql/oodml.lisp b/sql/oodml.lisp index 3e7ec9a..8eec40e 100644 --- a/sql/oodml.lisp +++ b/sql/oodml.lisp @@ -189,11 +189,14 @@ (db-value-from-slot slot val database)))) slots))) (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 this object: ~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