Not working in this context :
rows = db().select(db.tab1.ALL)
for r in rows:
* r._id* # KeyError
But this work :
db[request.args(0)].FK_id.represent=\
lambda FK_id, record: A(lot_number_dict[FK_id],\
_href=URL(r=request, f='read', args=(request.args(0),
str(record[db[request.args(0)].id.name]))))
Unreadable when debuging...
Richard
On Tue, May 15, 2012 at 12:34 PM, Anthony <[email protected]> wrote:
> I think you can refer to a custom id field with db.table._id (and get the
>> name with db.table._id.name).
>
>
> Oh yeah, db.table.id works as well, even for custom id fields.
>
> Anthony
>