Changes between Version 8 and Version 9 of IS_ONE_OF


Ignore:
Timestamp:
09/06/10 10:12:00 (14 years ago)
Author:
Fran Boon
Comment:

Need explicit orderby, otherwise it orders by all fields!

Legend:

Unmodified
Added
Removed
Modified
  • IS_ONE_OF

    v8 v9  
    2929{{{
    3030...
    31 db.Field('pr_pe_id', db.pr_pentity),
     31db.Field("pr_pe_id", db.pr_pentity),
    3232...
    3333
    3434db[table].pr_pe_id.requires = IS_NULL_OR(IS_ONE_OF(db,
    35     'pr_pentity.id',                          # key table=pr_pentity, key field=id
     35    "pr_pentity.id",                          # key table=pr_pentity, key field=id
    3636    shn_pentity_represent,                    # function to represent a pr_pentity entry as string
    37     filterby='opt_pr_pentity_class',          # type field in the pr_pentity table
    38     filter_opts=(1,)                          # select only entries with opt_pr_pentity_class in (1,) (select only persons)
     37    filterby="opt_pr_pentity_class",          # type field in the pr_pentity table
     38    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!
    3940    ))
    4041}}}