I'm trying to test the Teradata DAL change, but getting errors, I'm backtracking to test on SQL Server for creating Foreign Key relationships. Never tried this before now so I'm not sure if it worked before on SQL Server: dbSQL.define_table('Andrew_2py_PK', Field('Field1', 'string', length=10), Field('Field2'), format='%(Field1)s', primarykey = ['Field1'], migrate=True) dbSQL.define_table('Andrew_2py_PK_Child', Field('Parent', dbSQL.Andrew_2py_PK), Field('ChildField2'), format='%(ChildField2)s', primarykey = ['ChildField2'], migrate=True) getting the following : File "D:\Mercurial\web2py_Local\gluon\dal.py", line 6785, in __getattr__ return self[key] File "D:\Mercurial\web2py_Local\gluon\dal.py", line 6725, in __getitem__ return dict.__getitem__(self, str(key)) KeyError: '_id'
I found that at line 6576: elif isinstance(field, Table): evaluates to False for my FK column, which I expected to be True. I noticed that the book's DAL section doesn't mention references anymore references aren't working for references (yet), but they didn't work before either.