About
http://code.google.com/p/web2py/issues/detail?id=1273I sent a patch to Massimo, but I belive it should be improved.
The problem occurs when you call .as_dict() (without specifying a key) in a Rows instance (with join results). The object cannot guess a default key for creating the dictionary, so it defaults to "id" and produces a KeyError. My patch looks for an .id column trough the results set, but this will work for only generic .select() commands and will fail in other cases.
Could we use, for example, generic integers for each result in this case? Or it's better to leave the current behavior, raising an error if no valid key was passed?