bruno, as you say above is wrong. the workaround is: db.define_table('tablename', Field('fieldname',db.othertable, represent=lambda f: db.othertable[f].fieldname) )
best regards. On Jan 21, 2:15 pm, Bruno Rocha <rochacbr...@gmail.com> wrote: > It is a problem with SQLTABLE, detail tables is pure SQLTABLE, SOme people > identified a bug in SQLTABLE regarding references representation. > > It is showing the ID or sometines None for references. > > there is a workaround for that, using the represent direct on your model, > try that. > > db.define_table('tablename', > Field('fieldname',db.othertable,represent=lambda > f:f.othertable.fieldname) > ) > > I am trying to solve that and send a patch for SQLTABLE, but I couldn't find > a solution yet. > > I guess this was introduced in this > changesethttp://code.google.com/p/web2py/source/detail?r=71968b09fb51c3c0a612e... > > <http://code.google.com/p/web2py/source/detail?r=71968b09fb51c3c0a612e...>Anyone > else having problems with reference fields and SQLTABLE? > > --- > Bruno Rochahttp://about.me/rochacbruno/bio