Hi! I found this...
https://groups.google.com/forum/?fromgroups=#!topic/web2py/77ei0yBbuhw Wil this feature be included again some day? Web2py is fine... and it is getting better each day! Em sexta-feira, 23 de novembro de 2012 16h57min33s UTC-2, Alex Benfica escreveu: > > Hi! > > I have the same problem and the virtual fields availble on auth.user would > save me 1 RPC call per request on App Engine. > Is that a bug or is it the natural behavior!? > > I'm using web2py version 2.2.1! > > Thanks! > > > Em sábado, 23 de abril de 2011 16h55min28s UTC-3, Gregory Hellings > escreveu: >> >> I have a virtual field attached to the auth_user table titled "name" >> that renders the user's name with certain formatting based on auth >> membership. I also have records in a second table that are linked to >> the auth_user table. When I fetch these rows I can access the virtual >> as expected: >> >> row.speaker.name >> >> However, when I access the "auth.user" variable to determine the >> current user, it lacks the appropriate virtual field. Thus calling >> "auth.user.name" returns the string '0' (when it is JSON-ified) >> instead of the user's name with formatting. >> >> I'm supposing that the framework does not bind the virtual fields >> until after the "auth" object has been initialized, since they are >> declared in my db_auth.py file after the auth object is instantiated. >> Is this missing virtual field intended behavior, a documented problem >> that is a shortcoming of needing to declare the auth object before >> binding the virtual fields, or a bug? >> >> --Greg > > --