i get this error when i have mismatched data, but only on certain
fields. i haven't done the example that you're talking about exactly,
but maybe this can help.

i have a normal auth_user table, a period table and an element table
that look like this:

auth_user

period: userid, ...

element: periodid, ...

if i have test user, let's say with id 10, and i create a period, it
works fine. but if i delete user 10, i get the "Using a recursive
select but encountered a broken reference" error when looking on
appadmin. the fact that user #10 isn't there breaks it.

the weird part is that if element refers to a missing period, it's not
a problem. so let's say there's an element that uses period 50. if i
delete period 50 and then look at the element table on appadmin, it
works fine. it simply leaves the period dropdown blank since there's
no associated value.

i'm not sure why a missing auth_user record causes an error but a
missing period record doesn't. but hopefully this can be of some help.

db.define_table('period',
    Field('userid', db.auth_user, requires=IS_IN_DB(db,
db.auth_user.id, '%(last_name)s, %(first_name)s (%(id)s)')),
    ...
    )

db.define_table('element',
    Field('periodid', 'integer', requires=IS_IN_DB(db, db.period.id, '%
(startDate)s, %(endDate)s (%(id)s)')),
    ...
    )

matt

On Nov 25, 3:29 am, Seeker <[email protected]> wrote:
> Hi,
> Can anyone else replicate this issue (error 1 described at the top of
> this post)?
> It seems to be an error introduced when creating an app with the
> wizard and specifying related (referenced) tables in an incorrect
> order.
>
> Thanks.

Reply via email to