'reference Mjesta.PostanskiBroj'* should be *'reference PostanskiBroj'
*but I would not swear by references for legacy keyed tables.*
On Thursday, 25 September 2014 11:58:21 UTC-5, Alen Cerovic wrote:
>
> Hi,
>
> I am totaly new to web2py, actually started yesterday :)
> I am trying to work with legacy mssql database and having problems in
> referencing two legacy keyed tables
>
> db.define_table('Mjesta',
> Field <http://127.0.0.1:8000/examples/global/vars/Field>('PostanskiBroj',
> 'integer',notnull=True,unique=True),
> Field <http://127.0.0.1:8000/examples/global/vars/Field>('Naziv'),
> primarykey=['PostanskiBroj'],
> migrate=False)
>
> db.define_table('Partneri',
> Field <http://127.0.0.1:8000/examples/global/vars/Field>('Sifra','integer'
> ),
> Field <http://127.0.0.1:8000/examples/global/vars/Field>('Naziv'),
> Field <http://127.0.0.1:8000/examples/global/vars/Field>('Mjesto','reference
> Mjesta.PostanskiBroj'),
> primarykey=['Sifra'],
> migrate=False)
>
> no errors but field Partneri.Mjesto does not reference Mjesta.PostanskiBroj
>
> What am I doing wrong?
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.