<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
</div>How do you know that not all accounts end up in the rucksack?<br>
Could you show the code that you use for determining this? Or<br>
do you somehow inspect this manually?<br>
<font color="#888888"><br>
Arthur<br>
</font></blockquote></div><br><br>Here is rest of code :)<br>class definition<br><br>(defvar *rs-dir* (merge-pathnames "Projects/sand-box/data1/" (user-homedir-pathname)))<br><br>(with-rucksack (rs *rs-dir* );:if-exists :supersede)<br>
(with-transaction ()<br> (defclass account ()<br> ((username :initform nil<br> :initarg :username<br> :index :number-index<br> :accessor username-of)<br> (password :initform nil<br>
:initarg :password<br> :accessor password-of)<br> )<br> (:index t)<br> (:metaclass persistent-class))))<br><br><br>then function that prints and dumps objects<br>(defmethod print-object ((obj account) stream)<br>
(print-unreadable-object (obj stream :type t)<br> (with-slots (username password) obj<br> (format stream "~A ~A"<br> username password)))) <br><br>(defun print-accounts ()<br> (with-rucksack (rs *rs-dir*)<br>
(with-transaction ()<br> (let ((i 0))<br> (rucksack-map-class rs 'account<br> (lambda (object)<br> (print i)<br> (print object)<br> (setf i (+ i 1))<br>
))))<br> nil<br> ))<br><br>So i run (make-test-data) then if i dump the accounts sometimes not all of them ended up inside the rucksack.<br>if i run (make-test-data) a second times, ussually only first few accounts created end up in rucksack.<br>
<br>if i do (make-test-data1) it seems ok.<br><br>Possibly problem is i do not understand how to use rucksack properly.<br><br>