Re: Bug in 'update-records-from-instance'

"Saurabh Nanda" <[email protected]> Fri, 1 Jun 2007 10:04:05 +0530
Newsgroups gmane.lisp.clsql.general,gmane.lisp.clsql.devel
Message-ID <[email protected]>
Quoting from http://www.lispworks.com/documentation/lww42/LWUG-W/html/lwuser-w-171.htm
:
"update-records-from-instance  instance &key  database

Updates the record in database represented by instance . If the
instance is already associated with a database, that database is used
and database is ignored. If instance is not yet associated with a
database, a record is created for instance in the appropriate table of
database and the instance becomes associated with that database."

I think the intended behaviour is incorrect. If I'm *explicitly*
passing a database connection to 'update-records-from-instance' it
should use that, even if the object is already associated with a
database.

> Would you propose that an object can automatically reopen a database?
> If so, should the object then automatically reclose the database? Such
> issues are not covered by the CommonSQL specification.

I think the standard can be extended by saying that, if a database
connection is explicity passed that DB connection is used. Else, it
uses the DB connection associated with the object iff it is open. Else
it attemps to use *default-database*.

Thoughts?

PS: Continuing this thread only on clsql-devel.

Saurabh.
-- 
http://nandz.blogspot.com
http://foodieforlife.blogspot.com