[elephant-devel] Class Evolution
Dan Knapp
dankna at accela.net
Thu Dec 29 15:56:02 UTC 2005
Internally, Elephant stores a list of the slots in each object, by
their names. So, the new slot will be unbound in the existing
objects - you can check using slot-bound-p. If you delete a slot,
the old values for objects that had it will still be in the database,
but they will be harmless. New objects will always be stored
according to the definition that's loaded at the time. If you want
to rename a slot, you'll have to write migration code to copy
everything from the old slot to the new one.
-- Dan Knapp
On Dec 29, 2005, at 1:47 AM, Waldo Rubinstein wrote:
> Is Elephant friendly with class evolution? For example, if I create
> a CLOS object with, say 5 fields, and store some instances in an
> elephant DB and then the CLOS definition of the class changes to
> add a sixth field. What will happen to the existing five objects
> when retrieved? Will new objects be stored with the new field
> definition?
>
> Thanks,
> Waldo
>
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/elephant-devel/attachments/20051229/2b243db7/attachment.html>
More information about the elephant-devel
mailing list