No. The code does str(self.field), which converts db.image.id to 'image.id'
-- http://code.google.com/p/web2py/source/browse/gluon/validators.py#417.
Anthony
On Monday, July 9, 2012 4:42:39 PM UTC-4, MichaelF wrote:
>
> The doc shows two calling patterns for IS_IN_DB, the difference being the
> type of the second positional argument:
>
> The example in section 3.6 shows:
> db.comment.image_id.requires = IS_IN_DB(db, db.image.id, '%(title)s')
>
> Section 6.5 has a table for default validators:
> IS_IN_DB(db,table.field,format)
>
> Section 7.6.2 *Database Validators* (and other places) shows:
> db.dog.owner.requires = IS_IN_DB(db, 'person.id',
> '%(name)s', zero=T('choose one'))
>
> Is there a functional difference in passing the string vs. passing the
> field?
>