I have a class that looks something like this:
(defclass call-request () ((phone-number :initarg :phone-number :accessor phone-number :type string :col-type string) (call-time :initarg :callback-time :accessor callback-time :type (or null simple-date:timestamp :col-type (or db-null numeric) :initform nil) (extension :initarg :extension :accessor extension :type (or string null) :col-type (or db-null string) :initform nil)) (:metaclass postmodern:dao-class) (:table-name "call_request") (:keys phone-number) (:documentation "A request to be called."))
When I try to insert a call-request with no call-time or extension, I get the error:
Database error 42804: column "call_time" is of type time with time zone but expression is of type boolean You will need to rewrite or cast the expression. Query: INSERT INTO call_request (extension, callback_time, phone_number) VALUES (false, false, E'8005551212') [Condition of type CL-POSTGRES-ERROR:SYNTAX-ERROR-OR-ACCESS-VIOLATION]
How do I make Postmodern interpret nil as db-null rather than boolean?
Thanks,
Patrick