Add support for defining chainable relations (refs #38)