Actually I have issue #547 for this. http://code.google.com/p/web2py/issues/detail?id=547
On Friday, August 17, 2012 3:22:53 PM UTC-5, Simon Carr wrote: > > Hi, > > I found the answer to this question, so if anyone else is looking for an > answer to this question, here is the solution. > > in your model you need to just add 'id' to the to your primary field here > is an example. > > db.define_table( > 'product', > Field('id_product','id'), > your other fields as usual ........ > > notice the 'id' which web2py then knows that this should be treated as the > ID field that it is looking for. > > Thanks > Simon > > On 17 August 2012 20:45, Simon Carr <simon...@gmail.com <javascript:>>wrote: > >> Do I need an ID field in my database when using the SQLForm.grid >> >> I am reading data from a legacy MySQL database which does not have an id >> field. >> >> Many thanks >> Simon >> >> -- >> >> >> >> > > --