// <summary>
        // Create a column map for a structural column - ref/complextype/entity/record
        // </summary>
        // <param name="type"> Type info for the type </param>
        // <param name="name"> column name </param>
        private ColumnMap CreateStructuralColumnMap(md.TypeUsage type, string name)
        {
            // Get our augmented type information for this type
            var typeInfo = m_typeInfo.GetTypeInfo(type);

            // records?
            if (md.TypeSemantics.IsRowType(type))
            {
                return(CreateRecordColumnMap(typeInfo, name));
            }

            // ref?
            if (md.TypeSemantics.IsReferenceType(type))
            {
                return(CreateRefColumnMap(typeInfo, name));
            }

            // polymorphic type?
            if (typeInfo.HasTypeIdProperty)
            {
                return(CreatePolymorphicColumnMap(typeInfo, name));
            }

            // process complex/entity types appropriately
            if (md.TypeSemantics.IsComplexType(type))
            {
                return(CreateComplexTypeColumnMap(typeInfo, name, null, null, null));
            }

            if (md.TypeSemantics.IsEntityType(type))
            {
                return(CreateEntityColumnMap(typeInfo, name, null, null, null, true));
            }

            // Anything else is not supported (this currently includes relationship types)
            throw new NotSupportedException(type.Identity);
        }