I defined a dao class which I would like to get a sequential id from the database. For the id slot I have:
(id :col-type serial :accessor seat-id)
When I try to do an update-dao with an instance of that class, I get:
Error: The slot ID is unbound in the object #<CPA-SEAT 2665E40F> (an instance of class #<DAO-CLASS CPA-SEAT 25EE423B>).
I'd appreciate any suggestions about what I'm doing wrong. Thank you.
Mitch
Are you calling update-dao on an instance that hasn't been inserted yet? Or on an instance that was created, then inserted, then updated, without re-fetching it from the DB? In the second case, your Postgres has to be version 8.2 of higher for this to work. (In the first case, that doesn't make any sense.)
Marijn
Marijn Haverbeke wrote:
Are you calling update-dao on an instance that hasn't been inserted yet? Or on an instance that was created, then inserted, then updated, without re-fetching it from the DB? In the second case, your Postgres has to be version 8.2 of higher for this to work. (In the first case, that doesn't make any sense.)
Marijn
Thanks. That's it. I thought I was using save-dao, but I was really using update-dao.
Mitch
postmodern-devel@common-lisp.net