Saurabh Nanda | 11 Jun 2007 11:21
Picon

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

> Second, to accomodate your desire to take an object and store in (and
> presumably you also want to associate that object with) a different
> database, then a new function can be added that explicitly breaks the
> existing database-object binding. Something like:

Kevin, the intent is not to associate an object with a different
_database_, but with a different _database connection_ This kind of
thing becomes very common when one is writing "standalone" functions
to operate on objects mapped to databases. For example,

(defun get-student-with-id (id)
    (with-database (....)
        (select 'students :where [= [id] id])))

Now, if I obtain a particular student object using the function
defined above, change a slot, and try using
update-records-from-instance, it throws up an error.

With this in mind I would root for Nathan's
choose-database-for-instance rather than
dissociate-instance-from-records.

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

Gmane