[postmodern-devel] setting default value for serial column in prepared insert statement execution

Phil Marneweck haragx at gmail.com
Mon Sep 5 08:02:21 UTC 2011


Under certain circumstances (cant remember when it does not work, play
around with col-type serial vs integer ) something like this in the
class definition will work

(id :initarg :id :initform nil 
       :col-type serial :col-default (:nextval
"reporting-period-id-seq"))

or

when you initialize a new dao-class  use something like this

 :id (query (:select (:nextval "reporting-period-id-seq")) :single)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/postmodern-devel/attachments/20110905/68c7a91d/attachment.html>


More information about the postmodern-devel mailing list