Changes between Version 10 and Version 11 of S3/S3ResourceFilter


Ignore:
Timestamp:
01/31/12 14:10:00 (10 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3ResourceFilter

    v10 v11  
    150150}}}
    151151
    152 Note that filters (S3ResourceQuery instances) are resource-agnostic, so they can be re-used across resources (provided the same field selector applies in all of them).
     152If your filter involves a component table, you may need to add the respective joins. This can be done automatically, by specifying the component alias in the add_filter call:
     153
     154{{{
     155myfilter = S3QueryField("contact.value") == "dominic@nursix.org"
     156resource.add_filter(myfilter, c="contact")  # also adds the join for the "contact" component to the resource query
     157}}}
     158
     159Note that filters as such (i.e. S3ResourceQuery instances) are resource-agnostic, so they can be re-used across resources (provided the same field selector applies in all of them).
    153160
    154161Filters for fields which are not defined in a resource will be ignored quietly when retrieving records from the resource.