Any luck reproducing this? I can consistently make this bug happen by firstly launching my app via the app engine launcher with Lazy_tables = False.
Then whilst it's running switch it over to Lazy_tables = True. Matt On Sunday, September 16, 2012 8:34:46 AM UTC+12, Massimo Di Pierro wrote: > > No. I will asap. > > On Friday, 14 September 2012 23:00:10 UTC-5, Matt wrote: >> >> Weird. Did you try with GAE? >> >> Matt >> >> On Saturday, September 15, 2012 2:20:57 PM UTC+12, Massimo Di Pierro >> wrote: >>> >>> I cannot reproduce this. tested with and without lazy_tables = True on >>> 2.0.9. >>> >>> On Friday, 14 September 2012 20:19:48 UTC-5, Matt wrote: >>>> >>>> Hi there, >>>> >>>> I've noticed that the new lazy_tables option is causing problems. >>>> >>>> if I do the following (at least on GAE and Cloud SQL): >>>> >>>> setting dal(lazy_tables = True) >>>> >>>> db.define_table('x', >>>> Field('name', 'string') >>>> ) >>>> >>>> db.define_table('y', >>>> Field('x', 'reference x'), >>>> Field('age', 'integer', default = 30) >>>> ) >>>> >>>> x_id = db.x.insert(name = 'barry') >>>> db.y.insert(x = x_id, age = 99) >>>> >>>> And then run >>>> >>>> def test(): >>>> x = db(db.x.id > 0).select().first() >>>> >>>> for y in x.y.select(): >>>> logging.info(y) >>>> >>>> It fails with the following error: >>>> >>>> for y in x.y.select(): >>>> AttributeError: 'Row' object has no attribute 'y' >>>> >>>> If I set lazy_tables back again to False. It's fine again. >>>> >>>> Matt >>>> >>> --