Supporting referencing objects in queries to query based on relationships.