1

Let us say that I have an Address table which can be used by two different tables. The SourceID determines which table we are joining on. This has been split out using TPH and a condition that SourceID = 1. This works great. I also want to be able to go a step further and have another entity that has 2 conditions (SourceID = 1 and TypeID =2). I have tried inheriting from my first child entity, but the SQL produced does not take into account both conditions (the SourceID = 1 condition from the first derived entity and the TypeID = 2 from the newly derived entity)

Is there any way to be able to have a multi-level hierarchy with TPH so that I have different types based on a set of conditions? Thanks for your help!

Justin Rassier
  • 898
  • 12
  • 26
  • 1
    Legacy system, I would design it differently if I could, or redefine parts but I can't :-( – Justin Rassier Nov 15 '11 at 21:54
  • I reread your comment, I think you meant SourceID =1 and TypeID = 2? If that is the case, I would like to have a entity that relates to all TypeIDs (the first level of inheritance) and then the ability to associate with the SourceID and a specific TypeID. – Justin Rassier Nov 16 '11 at 15:20

0 Answers0