private void GenerateIndependentAssociationType(
            AssociationType associationType, DbDatabaseMapping databaseMapping)
        {
            DebugCheck.NotNull(associationType);
            DebugCheck.NotNull(databaseMapping);

            AssociationEndMember principalEnd, dependentEnd;
            if (!associationType.TryGuessPrincipalAndDependentEnds(out principalEnd, out dependentEnd))
            {
                if (!associationType.IsPrincipalConfigured())
                {
                    throw Error.UnableToDeterminePrincipal(
                        associationType.SourceEnd.GetEntityType().GetClrType(),
                        associationType.TargetEnd.GetEntityType().GetClrType());
                }

                principalEnd = associationType.SourceEnd;
                dependentEnd = associationType.TargetEnd;
            }

            var dependentEntityTypeMapping = GetEntityTypeMappingInHierarchy(databaseMapping, dependentEnd.GetEntityType());

            var dependentTable = dependentEntityTypeMapping
                .MappingFragments
                .First()
                .Table;

            var associationSetMapping
                = GenerateAssociationSetMapping(
                    associationType, databaseMapping, principalEnd, dependentEnd, dependentTable);

            GenerateIndependentForeignKeyConstraint(
                databaseMapping,
                principalEnd.GetEntityType(),
                dependentEnd.GetEntityType(),
                dependentTable,
                associationSetMapping,
                associationSetMapping.SourceEndMapping,
                associationType.Name,
                principalEnd);

            foreach (var property in dependentEnd.GetEntityType().KeyProperties())
            {
                associationSetMapping.TargetEndMapping
                                     .AddPropertyMapping(
                                         new ScalarPropertyMapping(
                                             property,
                                             dependentEntityTypeMapping.GetPropertyMapping(property).ColumnProperty));
            }
        }