Hi,
I have a question about using powertable.
When I try to build a powertable on the following select:
tasks=db(db.task.cpaid==3).select(db.task.cpa,db.task.description,db.task.ls_js)
I get the following error:
File "/home/xa21/workspace/web2py/applications/cpa4/models/
plugin_powertable.py", line 219, in __init__
_id = record.id
File "/home/xa21/workspace/web2py/gluon/dal.py", line 3786, in
__getattr__
return self[key]
File "/home/xa21/workspace/web2py/gluon/dal.py", line 3777, in
__getitem__
return dict.__getitem__(self, key)
KeyError: 'id'
I suspect this means that powertable requires a field named 'id'. Is
this true, or is there a way I can get around this?
(The table I'm interested in displaying is a legacy table that doesn't
contain an .id field)
- Tom