allow the target-fields argument to !foreign to be a single column again
Mon Mar 22 01:58:06 PDT 2010 marijnh@gmail.com
* allow the target-fields argument to !foreign to be a single column again
Warning: CRC errors found. These are probably harmless but should be repaired.
See 'darcs gzcrcs --help' for more information.
diff -rN -u old-postmodern/postmodern/deftable.lisp new-postmodern/postmodern/deftable.lisp
--- old-postmodern/postmodern/deftable.lisp 2014-07-31 04:32:18.000000000 -0700
+++ new-postmodern/postmodern/deftable.lisp 2014-07-31 04:32:18.000000000 -0700
@@ -72,7 +72,7 @@
*this* table, and, if the fields have different names in the table
referred to, another field or list of fields for the target table."
(let* ((args target-fields/on-delete/on-update)
- (target-fields (and args (listp (car args)) (pop args))))
+ (target-fields (and args (not (keywordp (car args))) (pop args))))
(labels ((fkey-name (target fields)
(to-sql-name (format nil "~a_~a_~{~a~^_~}_foreign" *table-name* target fields))))
(unless (listp fields) (setf fields (list fields)))