[web2py] Re: ProgrammingError: there is no unique constraint matching given keys for referenced table xuser

2011-05-31 Thread Carlos
Hi Massimo, I believe I've found the problem, it happens with any table (not just auth_user). If I define the 'id' field in any position other than first, and if there are references to the same table, then the error occurs. E.g. db.define_table( 'xtable', Field('xfield'),

[web2py] Re: ProgrammingError: there is no unique constraint matching given keys for referenced table xuser

2011-05-31 Thread pbreit
It sounds like you know what you are doing but I'll point out that typically you don't define an 'id' field since Web2py does that already.

[web2py] Re: ProgrammingError: there is no unique constraint matching given keys for referenced table xuser

2011-05-31 Thread Massimo Di Pierro
You are correct. Thanks for reporting this problem. This should now be fixed in trunk. Massimo On May 31, 9:15 am, Carlos carlosgali...@gmail.com wrote: Hi Massimo, I believe I've found the problem, it happens with any table (not just auth_user). If I define the 'id' field in any position

[web2py] Re: ProgrammingError: there is no unique constraint matching given keys for referenced table xuser

2011-05-30 Thread Massimo Di Pierro
Can I see your model definition for table xauth? On May 30, 10:34 pm, Carlos carlosgali...@gmail.com wrote: Hi, I'm using latest trunk, with 'xuser' instead of auth_user (which is not the issue because I was getting no errors up until very recently). Note that everything was working ok (no

[web2py] Re: ProgrammingError: there is no unique constraint matching given keys for referenced table xuser

2011-05-30 Thread Massimo Di Pierro
Can I also see your databases/_xauth.table (unpickled)? On May 30, 10:34 pm, Carlos carlosgali...@gmail.com wrote: Hi, I'm using latest trunk, with 'xuser' instead of auth_user (which is not the issue because I was getting no errors up until very recently). Note that everything was