I'd suggest a couple of changes:

- Change CamelCase (used in Python class definitions) with 
the_more_appropiate_convention for object attributes.
- Those foreign keys you have declared as ThingId should be renamed as 
thing_id (for a more web2py like naming style)
- Reference keys (links to other tables) are easily handled if declared as 
type "reference <tablename>" (i.e. it adds widgets automatically to 
sqlforms)

The empty query results you are getting (in case you actually inserted and 
commited changes to tables) are probably related to unexpected values (i.e. 
None, empty strings passed in the query expression)

Again, using the methods covered in the book for building forms (i.e. 
SQLFORM) will do things really easier.

If you still need to implement the code you posted as is, I'd suggest you 
log/inspect the output of the values submitted in the form, for detecting 
incompatible data used in the controller for building the query.

-- 



Reply via email to