Hi Leslie,

thanks for you answer - that was a helpful explanation.


Best regards

Lukas



--------------------------------------------------
From: "Leslie P. Polzer" <s...@viridian-project.de>
Sent: Wednesday, October 20, 2010 4:00 PM
To: "Elephant bugs and development" <elephant-devel@common-lisp.net>
Subject: Re: [elephant-devel] using elephant:open-store with relative paths

>
> Hi Lukas,
>
>> Here is a little example:
>> (asdf:operate 'asdf:load-op :elephant)
>> (elephant:defpclass TopicC ()  ((value :initarg :value   :accessor value 
>> :type
>> string))  (:index t))
>> (elephant:open-store '(:BDB
>> "/home/lukas/.sbcl/site/isidorus/trunk/src/data_base"))(make-instance 
>> 'TopicC :value
>> "t-1")(make-instance 'TopicC :value 
>> "t-2")(elephant:get-instances-by-class 'TopicC);
>> absolute db path => (#<TOPICC oid:2> #<TOPICC oid:3>); relative db path 
>> => (#<TOPICC
>> oid:2> #<TOPICC oid:3>)
>> (elephant:close-store)
>> (elephant:open-store '(:BDB
>> "/home/lukas/.sbcl/site/isidorus/trunk/src/data_base"))(elephant:get-instances-by-class
>> 'TopicC); absolute db path => (#<TOPICC oid:2> #<TOPICC oid:3>); relative 
>> db path => NIL
>>
>> Is this a bug or must I use absolute paths for opening a store?
>
> You don't need to use absolute paths, but you must take care that
> your relative paths are converted correctly to absolute paths.
> Your Lisp's CL:*DEFAULT-PATHNAME-DEFAULTS* influences this
> conversion.
>
> In your relative path example you're probably just seeing an
> empty database, i.e. not the same database as the one you have
> worked with before to create the instances.
>
> If you still need help then please give a full example that
> we can reproduce.
>
>  Leslie
>
>
>
> _______________________________________________
> elephant-devel site list
> elephant-devel@common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel
> 

_______________________________________________
elephant-devel site list
elephant-devel@common-lisp.net
http://common-lisp.net/mailman/listinfo/elephant-devel

Reply via email to