Also, more generally, it's OK to keep model definitions in different files,
but note that the files are executed in alphabetical order, so if you want
an object to be available in one file, make sure it is defined in a file
that comes earlier in alphabetical order. In this case, that isn't strictly
necessary because you can use the 'reference event_instance' syntax to
refer to tables that have not yet been defined.
Anthony
On Friday, November 30, 2012 8:17:41 AM UTC-5, Niphlod wrote:
>
> does the error show up if you use 'reference event_instance' instead of
> db.event_instance ?
>
> ('event_instance_id', 'reference event_instance')
>
> Il giorno venerdì 30 novembre 2012 10:17:54 UTC+1, Samuel Komfi ha scritto:
>>
>> I keep getting this error: *'DAL' object has no attribute
>> 'event_instance'*
>>
>> it points to my db_agents file as the culprit on this line:
>>
>> ('event_instance_id', db.event_instance)
>>
>> However if I move the definition of the event_instance table to that
>> db_agents model file the error disappears, but I get a new one referering
>> to another FKey in the event_instance tbl. Is there a way to avoid having
>> all my db.define_tables in the same file, I would like to keep them separate
>>
>
--