Multiple primary keys should work if you are defining legacy tables in
one of the supported DB engines.
Are you using MS SQL, DB2, Ingres or Informix?
Can we see the model?


On May 8, 5:57 am, Iceberg <iceb...@21cn.com> wrote:
> Hi there,
>
> I am fiddling multiple primary keys. Somehow I managed to find
> following example inside gluon/sql.py
>
>         db.define_table('account',
>           Field('accnum','integer'),
>           Field('acctype'),
>           Field('accdesc'),
>           primarykey=['accnum','acctype'])
>
> But running the example throws:
>
> Traceback (most recent call last):
>   ......
>   File "C:\DOWNLOAD\google_appengine\web2py\gluon\sql.py", line 2112,
> in __init__
>     raise SyntaxError, 'invalid table "%s" attribute: %s' %
> (tablename, k)
> SyntaxError: invalid table "account" attribute: sequence_name
>
> What did I do wrong?
>
> Iceberg

Reply via email to