I think this is fixed now but needs another test.
On Sep 9, 6:21 pm, Dave <thefe...@gmail.com> wrote: > Using the test code you provided before, I now get this error: > > --------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Users\Dave\Documents\Python\web2py\gluon\restricted.py", > line 188, in restricted > exec ccode in environment > File "C:\Users\Dave\Documents\Python\web2py\applications\welcome/ > models/db.py", line 79, in <module> > db.define_table('person',Field('first_name'), > polymodel=db.contact) > File "C:\Users\Dave\Documents\Python\web2py\gluon\contrib\gql.py", > line 128, in define_table > fields.insert(0,args['polymodel']) > AttributeError: 'tuple' object has no attribute 'insert' > --------------------------------------------------------------- > > That points to one of the new lines of code you added in rev 854. > > ~Dave > > On Sep 8, 9:36 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > Can you please try again using latest trunk? > > > Massimo > > > > > Can you help testingpolymodel? In trunk: > > > > > db=DAL('gae') > > > > db.define_table('contact',Field('address'),polymodel=True) > > > > db.define_table('person',Field('first_name'),polymodel=db.contact) > > > > db.define_table('company',Field('business_name'), > > > >polymodel=db.contact) > > > > > db.person.insert(first_name="John", address="here') > > > > db.company.insert(business_name="John Inc", address="there') > > > > contacts = db(db.contact.id>0).select() # should lists both persons > > > > and conpanies > > > > > Massimo > >