Re: update-record-from-instance question/gripe

Kevin Rosenberg <kevin-HJRc7zDS/[email protected]>
Newsgroups gmane.lisp.clsql.devel
Message-ID <[email protected]>
Cyrus Harmon wrote:
> I have a question/gripe about update-record-from-instance. Maybe I just 
> don't understand how to do what I want, but what I think I want is a 
> long-lived object that gets instantiated from tables via make-instance 
> or select with an open connection to a DB. Then I want to close that 
> connection and re-open another connection down the line. When I try to 
> update the object using update-record-from-instance, even if I supply 
> the new db connection, I fail as I think it's trying to use the old 
> connection. The docs for update-record-from-instance say that the db 
> only applies when the object isn't already associated with a database. 
> What about the case when were associated with a db via a defunct 
> connection? I'd like to be able to write this back to the database 
> without having to go through the trouble of making a new object. Does 
> this make sense?

Your statement makes sense.  The CommonSQL does not support such
functionality. You can acheive it by directly setting the
view-database slot in the db-object.

Kevin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.