tl;dr:“Over a decade ago, I used to work in a large and crazy C++ code base. The system had a feature that allowed our customers to search for a record based on a referred field’s value. For example, if we had an incident table, you could search by an attribute of the incident’s assignee (which referred to a record of user).”