Hello Hans,
Lets define a class:
(define-persistent-class a ()
((s1 :update :transient t)
(s2 :update)))
and make an instance of it:
(let ((obj (make-object 'a :s1 23 :s2 "ar")))
...
and then modify its transient slot:
(setf (a-s1 obj) 3)
When I stop and start Lisp and do:
(make-instance 'mp-store....
I get:
(slot-value obj 's1)
=> 23
(slot-value obj 's2)
=> "ar"
s1 is transient and one might expect it to be unbound, but it is not,
so I wondered if it is a bug or a feature, cause I might decide to use
it as a feature :-)
However, I guess that if I snapshot and then restore the database the
transient slot would be unbound (and that would prevent me from using
it as a feature, but I probably need a persistent slot anyway). Am I
correct?
Regards,
--
Камен
----- Original Message -----
From: Hans Hübner
Sent: 06 Юли 2007 at 13:47
Subject: Re: [bknr-devel] objects with transient slots
Hi Kamen,
are you saying that your transient slots are written to the transaction log
and snapshot? This is not the intended behavior. Can you verify the bug by
writing some distinctive string to such a slot, snapshot and then look in
the snapshot file for that string? Do you see the the value retained when
restoring or when starting your lisp afresh?
Thanks,
Hans
2007/7/6, Kamen TOMOV
kamen@cybuild.com:
>
> Hi,
>
> It is said in the datastore-manual:
>
> "... you can specify that a certain slot is transient, which means
> that it will not be snapshotted and that its value can be changed
> outside of a transaction."
>
> In my application the value of a transient slot is specified on object
> creation. When reloading the transaction log (server restart) the
> transient slot is bound and its value is correct. Is this intended
> behaviour or not? How is snapshotting the database different in that
> context?
>
> Thanks in advance,
>
> --
> Kamen
> _______________________________________________
> bknr-devel mailing list
> bknr-devel@common-lisp.net
>
http://common-lisp.net/cgi-bin/mailman/listinfo/bknr-devel
>