Re: [web2py] Re: DAL question: Reference to itself...

2017-08-09 Thread António Ramos
Solved! Thank you 2017-08-09 10:26 GMT+01:00 Leonel Câmara : > This does: > > db.define_table('person', > Field('name'), > Field('boss','reference person',requires=IS_EMPTY_OR(IS_IN_DB(db, ' > person.id', '%(name)s'))), > Format='%(name)s' > ) > > -- > Resources: > - http://web2py.com > - http://

[web2py] Re: DAL question: Reference to itself...

2017-08-09 Thread Leonel Câmara
This does: db.define_table('person', Field('name'), Field('boss','reference person',requires=IS_EMPTY_OR(IS_IN_DB(db, 'person.id', '%(name)s'))), Format='%(name)s' ) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - http