I have not been successful using the date class as a :col-type in a DAO. Here is what I have tried:
(defclass cpa-address () ((id :col-type integer :accessor address-id) (start_date :col-type date :accessor address-start-date) (version :col-type integer)) (:metaclass postmodern:dao-class) (:keys id) (:table-name gt_address))
In the Postgres database, the field type of start_date is date. When I select a cpa-address DAO, I expect to see a symbol of type simple-date in the start_date slot, but what I get is a CL universal time.
Should I be trying something else to take advantage of simple-date? Thanks for any help.
Mitch
Is simple-date/cl-postgres-glue.lisp being loaded? This happens automatically if simple-date is loaded *after* cl-postgres, but that's rather fragile. There's a :simple-date-postgres-glue system (defined in simple-date.asd) that loads this code.
Marijn Haverbeke wrote:
Is simple-date/cl-postgres-glue.lisp being loaded? This happens automatically if simple-date is loaded *after* cl-postgres, but that's rather fragile. There's a :simple-date-postgres-glue system (defined in simple-date.asd) that loads this code.
It wasn't being loaded. Now that it is, it behaves as expected. Thanks.
Mitch
postmodern-devel@common-lisp.net