I noticed there was a disparity between get-instances-by-class and map-inverted-index. I will let the code speak for itself:<br><br>BOOKS> (length (ele:map-inverted-index #'(lambda (isbn obj) obj) 'material 'isbn :collect t)) <br>
1945 <br>
BOOKS> (length (ele:get-instances-by-class 'material))<br>0 <br>BOOKS> (defparameter f (make-instance 'material :title "Fake Book"))<br>F <br>
BOOKS> (length (ele:get-instances-by-class 'material))<br>1 <br>
BOOKS> (length (ele:map-inverted-index #'(lambda (isbn obj) obj) 'material 'isbn :collect t)) <br>
1946<br><br>There is a similar problem with the university class.<br><br>BOOKS> (length (ele:get-instances-by-class 'university))<br>0<br>BOOKS> *stanford-university*<br>#<UNIVERSITY oid:204> <br>
BOOKS> (official-name *stanford-university*)<br>"Stanford University"<br><br>All of the instances in the database were created in a prior session. Then I shut down the DB and restarted Lisp. Now MAP-CLASS and GET-INSTANCES-BY-CLASS return nil for all classes. It seems like new instances get added to the "class index," but older instances are not found. However, these classes persist in the inverted slot indexes. Can anybody diagnose what's going on?<br>
<br>here are the definitions of the classes:<br><br>(defclass department ()<br> ((university :initarg :university :initform nil :accessor department-university<br> :index t)<br> (official-name :initarg :official-name :initform nil :accessor official-name)<br>
(common-name :initarg :common-name :initform nil :accessor common-name)<br> (abbreviation :initarg :abbreviation :initform nil :accessor abbreviation<br> :index t))<br> (:metaclass ele:persistent-metaclass)<br>
(:documentation "A department has a bunch of course listings."))<br><br>(defclass material ()<br> ((title :initarg :title :initform nil :accessor material-title<br> :index t)<br> (authors :initarg :authors :initform nil :accessor material-authors) ;; a list of authors <br>
(edition :initarg :edition :initform nil :accessor material-edition)<br> (isbn :initarg :isbn :initform nil :accessor material-isbn<br> :index t)<br> (asin :initarg :asin :initform nil :accessor material-asin<br>
:index t<br> :documentation "An Amazon.com identifier that uniquely identifies the material")<br> (image-uri :initarg :image-uri :initform nil :accessor material-image-uri))<br> (:metaclass ele:persistent-metaclass))<br>
<br>Thanks,<br>Red<br><br>