Keyed tables can only reference (or be referenced by) other keyed tables.

See 
http://web2py.com/books/default/chapter/29/06#Legacy-databases-and-keyed-tables


On Thursday, February 28, 2013 8:29:32 AM UTC-5, Dmitry Mosin wrote:
>
> <type 'exceptions.TypeError'>(argument of type 'bool' is not iterable)
>
> *File /var/www/py/web2py/gluon/dal.py in create_table at line 772* 
>  Function argument list 
>
> (self=<gluon.dal.MSSQLAdapter object>, table=<Table m_dsc_clients (...)>, 
> migrate=True, fake_migrate=False, polymodel=None)
>  Code listing 
>
>
>                     if hasattr(table,'_primarykey'):
>                         rtablename,rfieldname = referenced.split('.')
>                         rtable = db[rtablename]
>                         rfield = rtable[rfieldname]
>                         # must be PK reference or unique
>                         if rfieldname in hasattr(rtable,'_primarykey') \
> or rfield.unique:
>
>                             ftype = types[rfield.type[:9]] % \
>                                 dict(length=rfield.length)
>                             # multicolumn primary key reference?
>                             if not rfield.unique and 
> len(rtable._primarykey)>1:
>
>
>

-- 

--- 
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/groups/opt_out.


Reply via email to