> > > db.Organization(targetID).name >> >> I'd use db.Organization[targetID].name >> >> Not sure the first syntax is supported, (tables should have a __call__ >> attribute for that purpose) > > > Yes, the first syntax is supported -- it's just not the right query in > this case. >
Note, the difference is that the first syntax (i.e., with the parentheses) won't trigger an exception even if the id submitted is not an int, and it allows multiple conditions to be submitted rather than just an id. For example: db.Organization(db.Organization.nodeID == targetID).name See http://web2py.com/books/default/chapter/29/6#Fetching-a-Row. Anthony

