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

-- 



Reply via email to