public void IdentifyMappingTable(List <ForeignKey> fkList, Tables tables, bool checkForFkNameClashes, bool includeSchema)
        {
            IsMapping = false;

            var nonReadOnlyColumns = Columns
                                     .Where(c => !c.IsIdentity && !c.IsRowVersion && !c.IsStoreGenerated && !c.Hidden)
                                     .ToList();

            // Ignoring read-only columns, it must have only 2 columns to be a mapping table
            if (nonReadOnlyColumns.Count != 2)
            {
                return;
            }

            // Must have 2 primary keys
            if (nonReadOnlyColumns.Count(x => x.IsPrimaryKey) != 2)
            {
                return;
            }

            // No columns should be nullable
            if (nonReadOnlyColumns.Any(x => x.IsNullable))
            {
                return;
            }

            // Find the foreign keys for this table
            var foreignKeys = fkList.Where(x =>
                                           string.Compare(x.FkTableName, DbName, StringComparison.OrdinalIgnoreCase) == 0 &&
                                           string.Compare(x.FkSchema, Schema.DbName, StringComparison.OrdinalIgnoreCase) == 0)
                              .ToList();

            // Each column must have a foreign key, therefore check column and foreign key counts match
            if (foreignKeys.Select(x => x.FkColumn).Distinct().Count() != 2)
            {
                return;
            }

            var left  = foreignKeys[0];
            var right = foreignKeys[1];

            if (!left.IncludeReverseNavigation || !right.IncludeReverseNavigation)
            {
                return;
            }

            var leftTable = tables.GetTable(left.PkTableName, left.PkSchema);

            if (leftTable == null)
            {
                return;
            }

            var rightTable = tables.GetTable(right.PkTableName, right.PkSchema);

            if (rightTable == null)
            {
                return;
            }

            var leftPropName = leftTable.GetUniqueColumnName(true, rightTable.NameHumanCase, right, checkForFkNameClashes, false, Relationship.ManyToOne); // relationship from the mapping table to each side is Many-to-One

            leftPropName = _filter.MappingTableRename(DbName, leftTable.NameHumanCase, leftPropName);
            var rightPropName = rightTable.GetUniqueColumnName(false, leftTable.NameHumanCase, left, checkForFkNameClashes, false, Relationship.ManyToOne); // relationship from the mapping table to each side is Many-to-One

            rightPropName = _filter.MappingTableRename(DbName, rightTable.NameHumanCase, rightPropName);

            leftTable.AddMappingConfiguration(left, right, leftPropName, rightPropName, includeSchema);

            IsMapping = true;
            rightTable.AddReverseNavigation(Relationship.ManyToMany, leftTable, rightPropName, null, null, this);
            leftTable.AddReverseNavigation(Relationship.ManyToMany, rightTable, leftPropName, null, null, this);
        }