> Or, it's plain true. In SQLA, if you specify lazy loading of relationships > (which is the default), the query is deferred until the first time you > access the attribute, and there is therefore a query for each attribute > accessed. This is in contrast to eager loading, which does a single query > to populate all attributes (whether or not they are ever accessed). > >
I was interpreting your statement of "every access" to mean "every time you access the same attribute" and not to mean "every attribute you access". Anthony, your use of language is sometimes ambiguous - it is not the first time I have misunderstood you - please be more specific next time. 10x :) As for LazyLoading in web2py: We discussed this in the context of virtual-fields, and we've established that Lazyness in that context was NOT a deferred-access to the database, but a deferred-computation of the results within the run-time heap. Are you now referring to Laziness in web2py within a different context? Say, like in: db.Country(france).City.find(...) ? Because I don't understand how you would consider to see that as "Lazy" - it is "implicit", yes, but a "Lazy access to the database" can only have meaning within the context of a statefull framework. If every query is accessing the database ANYWAYS, then where is the *laziness* in that case? You mean a LazySet ? Like in Recursive-selects? person = db.person(id) for thing in person.thing.select(orderby=db.thing.name): print person.name, 'owns', thing.name Well, again, it IS "implicit", but why call it "Lazy"? The "so-called" *LazySet* is in "person.thing" ? If so, than it isn't "Lazy", just "implicit" and that's a bad choice of name - good thing it isn't in the documentation, as it would have generated even more confusion than already exists there... If not, then where is it? The thing.name ? If so, than It may be legitimate to call the "person.thing" *lazy, *but then I wouldn't want to use it. The way I see it, the only meaning the term "Lazy" has for accessing-the-database, can exist within a statefull framework - which is, "in relation to eager-loading" that can only exist there. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.