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). |
| 152 | If 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 | {{{ |
| 155 | myfilter = S3QueryField("contact.value") == "dominic@nursix.org" |
| 156 | resource.add_filter(myfilter, c="contact") # also adds the join for the "contact" component to the resource query |
| 157 | }}} |
| 158 | |
| 159 | Note 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). |