Yes... I forgot to say that... But this is a legacy database, and I can't rename the field....
Thanks Anthony.... On 10 jan, 12:16, Anthony <[email protected]> wrote: > On Tuesday, January 10, 2012 8:56:34 AM UTC-5, Marcello wrote: > > > Hello, > > > Maybe this is a stupid question. > > But I could not find the answer anywhere.... > > > I have, for example, 2 tables: > > > db.define_table('account', > > Field('name','string'), > > migrate=False) > > > db.define_table('user', > > Field('account_id',account), > > Field('name','string'), > > migrate=False) > > > I get an user: > > u = db.user[1] > > > If I want to get the account name of that user: > > u.account_id.name > > > But I want to have it with: > > u.account.name > > > Is it possible ?? > > Well, I guess you could just change the name of the "account_id" field to > "account" (which is actually common practice in web2py). > > Anthony

