Wiki

Clone wiki

rum / QueryingRelatedObjects

You can query properties of related objects. Just make sure, that the properties will be generated in the query widget:

from tw.rum.querybuilder import query_fields

@query_fields.around("issubclass(resource, Participation)")
def _query_fields_participation(next_method,resource):
    return next_method(resource)+["person.lastname", "person.firstname"]

At the moment no deeper nestings are supported.

Multiple relation to the same resource should work fine, as we use aliasing internally.

Updated