[postmodern-devel] Inserting into related tables

Marijn Haverbeke marijnh at gmail.com
Fri Jan 4 14:37:26 UTC 2008


Ugh, previous message got sent before I finished typing. Here we go again...

(defun get-producer-id (name)
 (or (query (:select 'id :from 'producer :where (:= 'name name)))
       (let ((new-producer (make-instance 'producer :name name))
             (insert-dao new-producer)
             (get-id new-producer))))

Does that work (it is probably full of typos and mistakes, but you get
the idea).

Cheers,
Marijn



More information about the postmodern-devel mailing list