Thanks, I gather then that there will never be millions of relations
etc in #1 then?

If so I might just create some dummy entity (that I will never have to
scan/seq) and put it there.



On Sat, Apr 14, 2012 at 3:15 PM, Alexander Burger <a...@software-lab.de> wrote:
> On Sat, Apr 14, 2012 at 09:47:26AM +0200, Alexander Burger wrote:
>> I always use the following pattern in such cases:
>>
>>    (for (This (seq (db: +User)) This (seq This))
>>       (when (isa '+User This)
>>          (doSomething This) ) )
>
> BTW, I would be cautious using 'seq' in application code. It is a rather
> low-level access to the database objects, and more typically used in
> debug and maintenance code.
>
> If you want to use the above in a more generic way, you might consider
> to use (isa '+Entity This) instead of a specific class.
>
>
> Also, you might need to filter for other things too. For example, to
> avoid collecting objects marked as obsolete (with the 'lose>' message),
> you would do
>
>   (for (This (seq (db: +User)) This (seq This))
>      (and
>         (isa '+Cls This)
>         (not (: T))
>         (doSomething This) ) )
>
> as the 'T' property is set when 'lose>'ing objects.
>
> Cheers,
> - Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to