From: Holger Schauer Date: Thu, 10 Mar 2011 12:34:15 +0000 (+0100) Subject: Add value check before updating :default slots. X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=refs%2Fheads%2Fauto-increment Add value check before updating :default slots. --- diff --git a/sql/oodml.lisp b/sql/oodml.lisp index d47bbba..e575d4d 100644 --- a/sql/oodml.lisp +++ b/sql/oodml.lisp @@ -257,7 +257,9 @@ (when (and (slot-exists-p slot 'db-constraints) (listp (view-class-slot-db-constraints slot)) (member :default (view-class-slot-db-constraints slot))) - (update-slot-from-record obj (slot-definition-name slot)))) + (unless (and (slot-boundp obj (slot-definition-name slot)) + (slot-value obj (slot-definition-name slot))) + (update-slot-from-record obj (slot-definition-name slot))))) ;;this may just be a NOP. (setf (slot-value obj 'view-database) database)))