I have an AllegroCache database which I use to persistently store some data:
Code: Select all
(defclass test ()
((id :index :any-unique :reader id)
(text :accessor text))
(:metaclass persistent-class))
now, consider the following:
Code: Select all
(setf *my-instance* (make-instance 'test :id 0 :text "Blabla"))
(commit)
this binds the newly created instance to *my-instance*. I have the following problem: if I write this:
Code: Select all
(make-instance 'test :id 0 :text "Blabla")
(commit)
then the instance gets stored in AllegroCache database, but I have no binding to use it. If I restart the machine, I will have to reload the program and bind the instances to some variables afterwards somehow; but I can't figure out a good way to do this.
I have made attempts to bind with doclass, but without success.