limit the select in (shared-initialize dao).
Mon Oct 1 10:48:57 PDT 2007 Ryszard Szopa <ryszard.szopa@gmail.com>
* limit the select in (shared-initialize dao).
diff -rN -u old-submarine/dao.lisp new-submarine/dao.lisp
--- old-submarine/dao.lisp 2014-07-29 22:02:15.000000000 -0700
+++ new-submarine/dao.lisp 2014-07-29 22:02:15.000000000 -0700
@@ -85,9 +85,9 @@
(when (slot-boundp dao 'id)
(with-object-connection (dao)
(let ((query-result (postmodern::query
- (:select '*
- :from (class-name-of dao)
- :where (:= 'id (get-id dao))) :alist)))
+ (:limit (:select '*
+ :from (class-name-of dao)
+ :where (:= 'id (get-id dao))) 1) :alist)))
(unless query-result
(error (make-condition
'dao-nonexistent-id