[storm] referenceset and lazy attributes

Bernd Dorn bernd.dorn at lovelysystems.com
Mon Sep 3 10:27:12 BST 2007



On 31.08.2007, at 17:45, Gustavo Niemeyer wrote:

> Hey again,
>
>> is it planned to implement the following?
>>
>> if a ReferenceSet property is used, it would be better to just fetch
>> the primary keys instead of all the attributes of a class, this can
>> be done either by using the primary key by default, or somehow define
>> if properties are lazy on a class.
>
> Yes, it's planned.  There are a few different strategies we can use to
> do that, and we'll certainly adopt one of them after some careful  
> thought
> (and we find time for it, of course).
>
> Do you have specific ideas about the topic?
>

I think a attribute-group implementation would be the best where we  
can define which attributes are selected together. So in the example  
below url and title would be fetched together.

class A(object):

     url = Unicode(group='smalltexts')
     title = Unicode(group='smalltexts')
     toc = Unicode(group='hugetexgts')



> -- 
> Gustavo Niemeyer
> http://niemeyer.net




More information about the storm mailing list