Changes between Version 10 and Version 11 of IS_ONE_OF
- Timestamp:
- 02/09/12 19:22:20 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
IS_ONE_OF
v10 v11 29 29 {{{ 30 30 ... 31 db.Field("p r_pe_id", db.pr_pentity),31 db.Field("pe_id", db.pr_pentity), 32 32 ... 33 33 34 db[table].p r_pe_id.requires = IS_NULL_OR(IS_ONE_OF(db,35 "pr_pentity. id", # key table=pr_pentity, key field=id34 db[table].pe_id.requires = IS_NULL_OR(IS_ONE_OF(db, 35 "pr_pentity.pe_id", # key table=pr_pentity, key field=pe_id 36 36 shn_pentity_represent, # function to represent a pr_pentity entry as string 37 filterby=" opt_pr_pentity_class",# type field in the pr_pentity table38 filter_opts=( 1,), # select only entries with opt_pr_pentity_class in (1,) (select only persons)39 orderby="pr_pentity. id"# NB Need explicit orderby, otherwise it orders by all fields!37 filterby="instance_type", # type field in the pr_pentity table 38 filter_opts=("pr_person",), # select only entries with instance_type in ("pr_person",) (select only persons) 39 orderby="pr_pentity.pe_id" # NB Need explicit orderby, otherwise it orders by all fields! 40 40 )) 41 41 }}}