It is possible if second define is called before the first one. Models are sorted alphabetically. Make sure vessel ia defined before the other table.
Marin (mobile) On Jun 16, 2013 7:53 PM, "lesssugar" <[email protected]> wrote: Hi. I define table 'vessel' in one of my models: db.define_table('vessel', Field('name', length = 128, label='Vessel type'), format=lambda r: r.name ) The table was created (checked it in sql.log). However, when I try to reference the table in another one (in another model) like this: ... Field('vessel', db.vessel, label='Vessel type'), ... I get the following error: *AttributeError: 'DAL' object has no attribute 'vessel'* * * How is it possible that the table 'vessel' *was* created and DAL *does not*recogize it? I've been successfully referencing other tables the same way and they all work fine. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

