Is it possible to mark a property to prefetch? Ie. not using fetch()

Submitted by Terje Pedersen on 6 April 2011 at 09:59

On 6 April 2011 at 10:02 Zef Hemel commented:

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


On 6 April 2011 at 10:09 Terje Pedersen commented:

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)
}


On 6 April 2011 at 10:11 Zef Hemel commented:

No, this is not (yet) supported by the underlying ORM framework.


On 6 April 2011 at 10:32 Terje Pedersen commented:

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 :-)


On 6 April 2011 at 10:33 Zef Hemel commented:

Yes, I want to support it. But you know, so many things I need to do, so little hours in a day :-)


On 11 April 2011 at 14:59 Zef Hemel closed this issue.

Log in to post comments