X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=sql%2Foodml.lisp;h=466e86a55945fa280a6f3e0a8c7034e304087d00;hp=bb6f447d5841444bc0400e1a7675579b5d3d1a07;hb=6bee16be3f891067ae8fe1a67e13b39e8ee72598;hpb=7b26e869b253d7f77f7d882d44fab090a6667280 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