[rucksack-devel] Too many seperate transactions mess up rucksack
John Janecek
nopa90 at gmail.com
Thu Jun 19 02:50:53 UTC 2008
I am a lisp newbie so maybe I am mistaken
I am on SBCL 1.015
I make class
(with-rucksack (rs *rs-dir* );:if-exists :supersede)
(with-transaction ()
(defclass account ()
((username :initform nil
:initarg :username
:index :number-index
:accessor username-of)
(password :initform nil
:initarg :password
:accessor password-of)
)
(:index t)
(:metaclass persistent-class))))
and then 2 functions below
(defun make-test-data ()
(dotimes (i 100)
(print i)
(with-rucksack (rs *rs-dir*)
(with-transaction ()
(make-instance 'account :username (random 1000000) :password
(random 1919191))
))
))
(defun make-test-data1 ()
(with-rucksack (rs *rs-dir*)
(with-transaction ()
(dotimes (i 100)
(print i)
(make-instance 'account :username (random 1000000) :password (random
1919191))
))))
if i do (make-test-data) not all the accounts will end up in the rucksack
(sometimes if first time yes) but second time i run no
If i do make-test-data1 no problem
What is going on ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/rucksack-devel/attachments/20080619/b9836037/attachment.html>
More information about the rucksack-devel
mailing list