No need. You should be able to just do
db.define_table('property',Field('PropertyID','id'),....)
i.e. add an extra field of type 'id' with the proper name. Let us know
if this works.
Massimo
On 12 Lug, 13:32, Michael Wolfe <[email protected]>
wrote:
> I have dozens of tables in an existing MSSQL database all with
> autonumber ID primary keys, but none that are named 'id'. They are
> instead named PropertyID, ClientID, etc. The official documentation
> seems to suggest renaming each of these fields to 'id'. However, that
> would require breaking hundreds of existing queries in other
> applications that use this database. Surely there must be some way to
> specify a name for an existing autonumber field to be used instead of
> 'id'.
>
> I'd really like to try web2py because it seems well thought-out, but
> if this is not possible it is a deal-breaker for me and I'll have to
> go back to Django (at least for this project...and any other future
> project that must support legacy databases).
>
> Thanks,
> -Mike