[elephant-devel] Storing objects in the root when don't care about the key

Joubert Nel joubert at joubster.com
Sun May 27 20:23:43 UTC 2007


Hi -

I have a persistent class (i.e. :metaclass persistent-metaclass) defined
and am adding a whole bunch of objects that are instances of this class
to the root of my Elephant store.

In order to retrieve a list of them I do:
	(map-class fn 'my-class-name)

My question is:
Currently I'm using the OID of the object as its key when I
(add-to-root) because this is the only slot in my class that is
guaranteed to be unique. (from a use-case point of view I don't care
what the key is).

I'm doing this to avoid overhead in generating more esoteric unique keys
such as UUID's. 

Are there any reasons why I should NOT use OID as the key? 

Joubert








More information about the elephant-devel mailing list