When I try to access the ad1 table from appadmin, a message is displayed
"Invalid Query 'name'" and the table isn't displayed. No exceptions or
tickets are generated. If I comment out the virtual field, it works fine.
What is wrong in my virtual field definition below?
geo.define_table('country'
,Field('id_un', 'id')
,Field('iso2_0', 'string', length=2)
,Field('iso3_0', 'string', length=3)
,Field('name', 'string', length=50)
,migrate=False
,format='%(name)s')
geo.define_table('ad1'
,Field('id_un', geo.country, writable=False)
,Field('id_1', 'id')
,Field('name', 'string', length=50)
,Field('iso_1', 'string', length=3)
,migrate=False)
geo.ad1.vname=Field.Virtual(lambda r: "%s, %s" % (r.name,
geo.country(r.id_un).iso3_0))