Re: [elephant-devel] unique object IDs and OIDs

2009-05-05 Thread Tomo Matsumoto
> What are you building with Elephant? A web application framework named web4r. (http://github.com/tomoyuki28jp/web4r/tree/master) - The goal is "Enables users to develop web applications with the shortest codes". - It currently only works with the elephant v0.9, but I am working on it to support

Re: [elephant-devel] unique object IDs and OIDs

2009-05-05 Thread Tomo Matsumoto
> It does return NIL for me, at least with BDB on 1.0-latest: > > ? (ele::controller-recreate-instance *store-controller* 55) > NIL Oh, I was trying with the classname optional parameter, and it recreates an instance when there is no instance associated with the oid. ex: (ele::controller-recre

Re: [elephant-devel] unique object IDs and OIDs

2009-05-05 Thread Leslie P. Polzer
> What I have been looking for is tihs: > (defun get-instance-by-oid (class oid) > (awhen (ele::controller-recreate-instance *store-controller* oid) > (when (typep it class) > it))) > > Thanks for your help, Leslie! You're welcome. :) What are you building with Elephant? Leslie -

Re: [elephant-devel] unique object IDs and OIDs

2009-05-05 Thread Leslie P. Polzer
Tomo Matsumoto wrote: > Thanks for your response, Alex. > > When we pass a nonexistent oid to controller-recreate-instance, it > recreates an instance, but I am looking for a function which returns > nil. It does return NIL for me, at least with BDB on 1.0-latest: ? (ele::controller-recreate-ins

Re: [elephant-devel] unique object IDs and OIDs

2009-05-05 Thread Tomo Matsumoto
Thanks for your response, Alex. When we pass a nonexistent oid to controller-recreate-instance, it recreates an instance, but I am looking for a function which returns nil. Is there such a function? (Or a way to implement such.) Thanks in advance. Tomo On Sat, Apr 25, 2009 at 1:36 AM, Alex Miz

Re: [elephant-devel] unique object IDs and OIDs

2009-04-23 Thread Tomo Matsumoto
Hello, http://common-lisp.net/pipermail/elephant-devel/2008-November/004534.html > PE> If using OID values makes sense for this purpose, is there a user-API > PE> way to get an object by its OID? > >yep, via class index: > >(get-value oid (find-class-index 'classname)) It seems like the function

Re: [elephant-devel] unique object IDs and OIDs

2008-11-14 Thread Alex Mizrahi
PE> I'm wondering if it is appropriate to use the OIDs that elephant PE> assigns objects for this purpose. yep, i think it's fine PE> Will these values change during the lifetime of the associated object? they shouldn't. oids are not preserved across export/import operations (by design of t