Howto prefetch entity
Is it possible to mark a property to prefetch? Ie. not using fetch()
Submitted by Terje Pedersen on 6 April 2011 at 09:59
Issue Log
Yes, when querying for it using query collections, e.g.:
list(t in Task.all() where done == false prefetch category) { label(t.category.name) }
You can have multiple
prefetch
clauses or put multiple properties there, e.g.prefetch category, otherref
Thanks :) But it seems like its not possible to write something like this:
list(t in Task.all() where category.name == “test” prefetch category) {
label(t.title)
}
No, this is not (yet) supported by the underlying ORM framework.
Any plan for supporting it?
I found a solution for this specific case. I have some entities with “user : User” and what I really needed was only to do a “where user == u” instead where u is the current User entity :-)
Yes, I want to support it. But you know, so many things I need to do, so little hours in a day :-)
Log in to post comments