web2py/web2py — pull request #339 by flavour (2014-01-07 22:38:57+00:00)
Title: Fix for orderby_on_limitby with Table aliases

When using Table aliases the Field.sqlsafe fails as Field._table doesn't use the Alias.
There may be better solutions as this seems a more general problem, but this fix works for my usecase at least.