On Thursday, August 15, 2013 10:04:45 AM UTC-4, Quint wrote: > thnx, > > but my goal is to prevent repeated queries for the same record when > accessing ref fields on rows from the same result set. > > I'm missing something, how do those Virtual Fields achieve that? >
Yes, that's exactly what the virtual field does -- when the the Rows object is created from the initial select, the value of the virtual field is calculated for each Row, and it remains in the Row (i.e., it is not re-calculated on each access). There is also Field.Method(), which does re-calculate on every access (the advantage is that it is lazy, so nothing is calculated until accessed -- and because of that, it can take arguments at the time it is called). And about the join, wouldn't that mean it won't work on GAE? > Oh, yeah, forgot you said you are on GAE. Anthony -- --- 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.