Imagine this scenario.
- I store documents references and paths in a table.
- Multiple different entities and store documents in this table
- This table has no foreign keys except for DocumentType
- Documents are identified by the SourceType and SourceId columns e.g. SourceType = "People", SourceId = 1 or SourceType = "Company", SourceId = 23 etc. etc.
My question is how do I map from People to Document to DocumentType in order to get a list of all document types associated with a person?
