modified the automagic naming of many-to-many slots.
authorDrew Crampsie <drewc@tech.coop>
Wed, 20 Jul 2005 19:34:01 +0000 (12:34 -0700)
committerDrew Crampsie <drewc@tech.coop>
Wed, 20 Jul 2005 19:34:01 +0000 (12:34 -0700)
darcs-hash:20050720193401-5417e-0b196039972f7260bf49ac9e8e1d257f2610d2ae.gz

src/backend/clsql.lisp

index e4e8353..380b082 100644 (file)
@@ -209,7 +209,7 @@ AND fa.attnum = ANY (pg_constraint.confkey)"))
    :set t))
 
 (defun gen-many-to-many (row home-key foreign-key)
    :set t))
 
 (defun gen-many-to-many (row home-key foreign-key)
- (let ((name (sql->sym (string-upcase (format nil "~A->~A" (string (car row)) (string (second row)))))))
+ (let ((name (sql->sym (string-upcase (format nil "~A<-~A->~A" (string (car row)) (string foreign-key) (string (second row)))))))
    (setf row (mapcar #'sql->sym row))
    `(,name
      :accessor ,name
    (setf row (mapcar #'sql->sym row))
    `(,name
      :accessor ,name