You are correct. Thanks for reporting this problem.
This should now be fixed in trunk.

Massimo

On May 31, 9:15 am, Carlos <[email protected]> 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 other than first, and if there
> are references to the same table, then the error occurs.
>
> E.g.
>
>    db.define_table(
>        'xtable',
>        Field('xfield'),
>        Field('id', 'id'),
>        Field('xref', 'reference xtable'),
>    )
>
> With the above definition, I will get the following error:
>
>    ProgrammingError: there is no unique constraint matching given keys for
> referenced table "xtable"
>
> This seems to solve my problem, but now I'm facing other issues (only with
> the latest changesets in trunk), I'm still checking.
>
>    Carlos

Reply via email to