Add support for relationship queries