Hi Matt, Thanks very much for responding. I think you may (indirectly) be onto something. It never occurred to me that the auto population of tables with the wizard could be the source of the problem. But it could in fact be that the wizard was perhaps creating records with missing references.
I have just updated my Web2Py from trunk to test the theory (use the wizard to create 2 apps: one with auto poplulate and one without. Then compare.) It seems however that the problem is now fixed in trunk. I see a commit in trunk that reads: "wizard issue with sorting of popultate statments fixed, thanks Tiago" ... wonder if that fixed it? Thanks for the assistance anyway. On Dec 1, 7:55 pm, mattynoce <[email protected]> wrote: > 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.- Hide quoted text - > > - Show quoted text -

