The web2py documentation indicates that a reference field has the following 
default validator:
IS_IN_DB(db, table.field, format)

I suggest the default validator to be described as:
IS_IN_DB(db, table._id, table._format)

If you use any other field besides *table._id* in the validator, this 
causes errors when trying to insert a new row (e.g. via the admin interface)
Maybe it is worth indicating that when -for whatever reason- you want to 
change the validator, you must refer back to the *id* and not to another 
field of the referring table?

Or am I wrong in this reasoning?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to