[bknr-cvs] r2056 - trunk/bknr/src/data

bknr at bknr.net bknr at bknr.net
Sun Nov 5 20:51:19 UTC 2006


Author: hhubner
Date: 2006-11-05 15:51:19 -0500 (Sun, 05 Nov 2006)
New Revision: 2056

Modified:
   trunk/bknr/src/data/object.lisp
Log:
Make reminder warning for class changes suppressable.


Modified: trunk/bknr/src/data/object.lisp
===================================================================
--- trunk/bknr/src/data/object.lisp	2006-11-05 13:25:47 UTC (rev 2055)
+++ trunk/bknr/src/data/object.lisp	2006-11-05 20:51:19 UTC (rev 2056)
@@ -25,16 +25,20 @@
 (defmethod validate-superclass ((sub persistent-class) (super indexed-class))
   t)
 
+(defvar *suppress-schema-warnings* nil)
+
 (deftransaction update-instances-for-changed-class (class)
-  (warn "updating ~A instances of ~A for class changes" (length (class-instances class)) class)
+  (unless *suppress-schema-warnings*
+    (warn "updating ~A instances of ~A for class changes" (length (class-instances class)) class))
   (mapc #'reinitialize-instance (class-instances class)))
 
 (defmethod reinitialize-instance :after ((class persistent-class) &rest args)
   (declare (ignore args))
   (when *store*
     (update-instances-for-changed-class (class-name class))
-    (warn "Class ~A has been changed. To ensure correct schema evolution, please snapshot your datastore."
-	  (class-name class))))
+    (unless *suppress-schema-warnings*
+      (warn "Class ~A has been changed. To ensure correct schema evolution, please snapshot your datastore."
+	    (class-name class)))))
 
 (defclass persistent-direct-slot-definition (index-direct-slot-definition)
   ((transient :initarg :transient :initform nil)




More information about the Bknr-cvs mailing list