private bool DetermineRequiresIsTypeOf(
     TableMapping tableMapping, EdmEntitySet entitySet, EdmEntityType entityType)
 {
     // IsTypeOf if this is the root for this table and any derived type shares a property mapping
     return entityType.IsRootOfSet(tableMapping.EntityTypes.GetEntityTypes(entitySet)) &&
            ((tableMapping.EntityTypes.GetEntityTypes(entitySet).Count() > 1
              && tableMapping.EntityTypes.GetEntityTypes(entitySet).Any(et => et != entityType && !et.IsAbstract))
             ||
             _tableMappings.Values.Any(
                 tm =>
                 tm != tableMapping
                 &&
                 tm.Table.ForeignKeyConstraints.Any(
                     fk => fk.GetIsTypeConstraint() && fk.PrincipalTable == tableMapping.Table)));
 }