Added support for relations to Model.filter().

Closes #32