[storm] referenceset and lazy attributes
Gustavo Niemeyer
gustavo at niemeyer.net
Mon Sep 3 15:26:45 BST 2007
> this question is exactly the use-case :-)
>
> i can define for my application by grouping which attributes should
> be loaded together, if no group is defined it should be loaded with
> the initial getter (e.g. the primary keys)
>
> so for example if i have an overview of objects in a web-page, and
> for the selected item i have a detail view on the same page it only
> fetches the title and url for the overview items and the 'toc' for
> the selected one. another example attribute in the 'hugetexts' gruop
> would be "abstract"
I believe that this use case is kind of covered by the API I suggested.
'url' and 'title' would be fetched for all of them, but 'toc' would
only be fetched for the one that touched it.
This is the most wanted use case I think: you have a few small entries
that are commonly used, and a big one that you only need occasionally.
The price for the flexibility of specifying precisely which entries should
be grouped together is a more obscure API. So I'm wondering if we should
pay that price, or if the simple API covers most cases, and creates only
a small overhead in edge cases.
--
Gustavo Niemeyer
http://niemeyer.net
More information about the storm
mailing list