[elephant-devel] Inherited slots don't get persisted
Yarek Kowalik
yarek.kowalik at gmail.com
Wed Dec 24 20:15:07 UTC 2008
I have two classes, one an "ephemeral" and one persistent. The persistent
class inherits from the ephemeral class. When I copy slot values from an
ephemeral instance to persistent instance, only the slots that are redefined
in the persistent class get persisted properly, the other inherited slots
are not, as if they were marked transient by default. Is this the correct
behaviour? Is there a way to make all inherited slots persistent?
In the example below only slots 'last-name' and 'username' get persisted
when copying from 'site-user-ephemeral instance to 'site-user instance.
Yarek
(defclass site-user-ephemeral ()
((first-name
:accessor site-user-first-name
:initarg :first-name
:type string)
(last-name
:accessor site-user-last-name
:initarg :last-name
:type string)
(username
:accessor site-user-username
:initarg :username
:type string)
(email
:accessor site-user-email
:initarg :email
:type string)
(password
:accessor site-user-password
:initarg :password
:type string))
(:documentation "object for storing user data"))
(defpclass site-user (site-user-ephemeral)
((last-name)
(username
:index t))
(:index t)
(:documentation "persistent object for storing user data"))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/elephant-devel/attachments/20081224/5d0bbe74/attachment.html>
More information about the elephant-devel
mailing list