Re: [elephant-devel] Storing objects in the root when don't care about the key / add same key to root more than once

2007-05-28 Thread Ian Eslick
Here is a proposal for approaching this problem. Currently the only problem with depending on foreign uses of OIDs is migration. There is an interface of sorts already, although I'm sure it could be improved or cleaned up with a little bit of work. If future features (i.e. online GC) add

Re: [elephant-devel] Storing objects in the root when don't care about the key / add same key to root more than once

2007-05-28 Thread Red Daly
Ian Eslick wrote: A few clarifications: It is poor coding practice to use system-assigned OIDs. In future versions of elephant OIDs may change over time due to GC, auto recovery of oid space, etc. It's sort of like using the physical address of an object in a C++ program. There is a legiti

Re: [elephant-devel] Storing objects in the root when don't care about the key / add same key to root more than once

2007-05-28 Thread Joubert Nel
On Mon, 2007-05-28 at 09:54, Ian Eslick wrote: > On May 28, 2007, at 9:26 AM, Joubert Nel wrote: > > My impression until I saw how persistent objects behave was that > > everything you want to store via Elephant had to be "rooted". > > Did you read through the tutorial in the new manual? I thou

Re: [elephant-devel] Storing objects in the root when don't care about the key / add same key to root more than once

2007-05-28 Thread Ian Eslick
On May 28, 2007, at 9:26 AM, Joubert Nel wrote: On Mon, 2007-05-28 at 08:51, Ian Eslick wrote: A few clarifications: Standard persistent classes are not saved by default. To get access Ian, when are objects that are instanced from persistent classes saved? I simply call (make-instance)

Re: [elephant-devel] Storing objects in the root when don't care about the key / add same key to root more than once

2007-05-28 Thread Joubert Nel
On Mon, 2007-05-28 at 08:51, Ian Eslick wrote: > A few clarifications: > > Standard persistent classes are not saved by default. To get access Ian, when are objects that are instanced from persistent classes saved? I simply call (make-instance) on the following class definition: (defclass ri

Re: [elephant-devel] Storing objects in the root when don't care about the key / add same key to root more than once

2007-05-28 Thread Ian Eslick
A few clarifications: Standard persistent classes are not saved by default. To get access to a class via the map-class operator the class or a slot of the class must be declared as :indexed. If a slot is indexed, then that value can be used as a key for the object via the get-instances-by

Re: [elephant-devel] Storing objects in the root when don't care about the key / add same key to root more than once

2007-05-28 Thread Dmitry V. Gorbatovsky
On Monday 28 May 2007 07:36, Joubert Nel wrote: > On Sun, 2007-05-27 at 23:46, Robert L. Read wrote: > > On Sun, 2007-05-27 at 16:23 -0400, Joubert Nel wrote: > On another note: > In my experimentation I added several objects to the root, all with the > same key. > All these objects get added but

Re: [elephant-devel] Storing objects in the root when don't care about the key / add same key to root more than once

2007-05-27 Thread Joubert Nel
On Sun, 2007-05-27 at 23:46, Robert L. Read wrote: > On Sun, 2007-05-27 at 16:23 -0400, Joubert Nel wrote: > > 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

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

2007-05-27 Thread Robert L. Read
On Sun, 2007-05-27 at 16:23 -0400, Joubert Nel wrote: > 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: >

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

2007-05-27 Thread Joubert Nel
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 us