It still has both the original problems.  Here's what I'm testing so
far:

>contacts = db(db.contact.id>0).select()

Returns all contacts, as it should

>people = db(db.person.id>0).select()

Also returns all contacts, instead of just the contacts that are of
type "person"

>address = people[0].address

Works, and returns the address of the first person.

>name = people[0].first_name

Crashes, with the following trace:

Traceback (most recent call last):
  File "C:\Users\Dave\Documents\Python\web2py\gluon\restricted.py",
line 188, in restricted
    exec ccode in environment
  File "C:\Users\Dave\Documents\Python\web2py\applications\welcome/
controllers/default.py:index", line 66, in <module>
  File "C:\Users\Dave\Documents\Python\web2py\gluon\globals.py", line
96, in <lambda>
    self._caller = lambda f: f()
  File "C:\Users\Dave\Documents\Python\web2py\applications\welcome/
controllers/default.py:index", line 23, in index
  File "C:\Users\Dave\Documents\Python\web2py\gluon\sql.py", line 729,
in __getattr__
    return dict.__getitem__(self,key)
KeyError: 'first_name'

Reply via email to